Here you can post about your scenario's, mods, custom maps and YouTube channels!
Netherlands HappySmurf
Crossbow
Posts: 5

22 Nov 2019, 16:47

Hey guys,
Together with some other guys in working on the development of the romans in age of empires online.
Currently im experimenting besides the 3d models on new game modes.
I already have the rms script but cant figure out how to place the units random inside a painted area.
Here the part im reffering to:
var locquestareaC = utilsAH_convertareatotriggerstring("quest_area_C")

Area C is very large and i want it so that the units (which are spawned every 10 sec) are placed spread over the area instead of on 1 central point.
User avatar
Canada dansil92
ESOC Maps Team
Posts: 1665
ESO: dansil92

22 Nov 2019, 18:40

rmPlaceObjectDefInRandomAreaOfClass(ObjectName, 0, rmClassID("classAreaName"), 1);

You'll just have to add a class to the area

OR


rmPlaceObjectDefInArea(objectName, 0, areanName, numberOfObjects);

Be warned non-guardian units placed by rms become invincible and aggressive unless assigned to a player
SirCallen wrote:Also assume hypothetically that you can left click and shift click and that TPs aren't black holes and the game won't delete your C: drive.
User avatar
Malaysia Aizamk
Pro Player
ESOC WarChiefs Classic 2017
Posts: 1266
Location: ded

23 Nov 2019, 05:26

What he's looking for is trigger-level though (spawns every 10 sec), not RMS level. I see no way about it other than to define your own custom trigger.
oranges.
Netherlands HappySmurf
Crossbow
Posts: 5

23 Nov 2019, 10:21

Nope aizamk,
Its fully rms code. The some parts could have ,as you say, be done with triggers but in this case i need it all in 1 rms file to swap it between different questfiles and scn's.
User avatar
Czech Republic EAGLEMUT
ESOC Dev Team
Donator 05
Posts: 4150
ESO: EAGLEMUT
Clan: WPact

23 Nov 2019, 13:33

He means it has to be done through the trigger api provided in RMS. Basically RMS code generates the initial map and that's it, it cannot spawn anything afterwards. However, it can create triggers as part of the initial map, which may then do something after the map is generated. Before AoEO, this was done by functions like rmCreateTrigger, not sure how this api looks like in AoEO, but I'd assume it was ported in some form. The kind of trigger effects needed also depend entirely on what trigger effects are available in AoEO, which I'm not familiar with, so it's hard to say...
Netherlands HappySmurf
Crossbow
Posts: 5

23 Nov 2019, 14:21

aha i get it, thanks Eaglemut, the AOEO rms engine is the same as the AOE3 engine.
Netherlands HappySmurf
Crossbow
Posts: 5

27 Nov 2019, 06:36

Hey Aizamk
Can you explain me how this custom trigger can be made?
Netherlands HappySmurf
Crossbow
Posts: 5

03 Dec 2019, 06:47

```
var locQuestAreaC = UtilsAH_ConvertAreaToTriggerString("Quest_Area_C");
var locQuestAreaD = UtilsAH_ConvertAreaToTriggerString("Quest_Area_D");
```

```UtilsWA_SpawnWaveLoop(
wavesStartDelay, //nDelay
ennemyPlayerIdSpearman, //nPlayer
new List<UnitDataSet>
{
new UnitDataSet("Gr_Inf_Spearman", 1)
}, //UnitData
(int)(wavesMaxTime / (wavesTime*3)), 
(wavesTime*3), //nGroupInterval
new List<string> {locQuestAreaC}, //SpawnLocList
new List<string> {locQuestAreaD}, //TargetLocList
wavesTime, //nWaveLoopInterval
false, //bLoopArmyCheck
-1); //PredefinedArmyID
```
I need it so that during the map all units spawn randomly inside the entire area C. so it plays out that all units come from all places to the centralised area D. Hope you can help me out. 
User avatar
Netherlands edeholland
ESOC Community Team
Donator 01
Posts: 4688
ESO: edeholland
GameRanger ID: 4053888
Clan: ESOC

03 Dec 2019, 14:34

Code: Select all

You can format code using the "[code]" and "[/code]" blocks.
User avatar
Czech Republic EAGLEMUT
ESOC Dev Team
Donator 05
Posts: 4150
ESO: EAGLEMUT
Clan: WPact

04 Dec 2019, 03:25

HappySmurf wrote:aha i get it, thanks Eaglemut, the AOEO rms engine is the same as the AOE3 engine.

I don't think "same" is the right word, at least not from most perspectives I can think of. AoEO RMS is done in a completely different programming language, and I can tell you that the code snippet you posted above doesn't even resemble anything you could ever see in an AoE3 RM script.

Forum Info

Return to “User-created Content”



Who is online

Users browsing this forum: No registered users and 2 guests