Rms randomised placement.
-
- Crossbow
- Posts: 5
- Joined: Nov 21, 2019
Rms randomised placement.
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.
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.
Re: Rms randomised placement.
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
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
Re: Rms randomised placement.
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.
-
- Crossbow
- Posts: 5
- Joined: Nov 21, 2019
Re: Rms randomised placement.
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.
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.
Re: Rms randomised placement.
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...
-
- Crossbow
- Posts: 5
- Joined: Nov 21, 2019
Re: Rms randomised placement.
aha i get it, thanks Eaglemut, the AOEO rms engine is the same as the AOE3 engine.
-
- Crossbow
- Posts: 5
- Joined: Nov 21, 2019
Re: Rms randomised placement.
Hey Aizamk
Can you explain me how this custom trigger can be made?
Can you explain me how this custom trigger can be made?
-
- Crossbow
- Posts: 5
- Joined: Nov 21, 2019
Re: Rms randomised placement.
```
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.
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.
- edeholland
- ESOC Community Team
- Posts: 5033
- Joined: Feb 11, 2015
- ESO: edeholland
- GameRanger ID: 4053888
- Clan: ESOC
Re: Rms randomised placement.
Code: Select all
You can format code using the "[code]" and "
Re: Rms randomised placement.
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.HappySmurf wrote:aha i get it, thanks Eaglemut, the AOEO rms engine is the same as the AOE3 engine.
Who is online
Users browsing this forum: No registered users and 8 guests