This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Is their a way to move a random unit from a region without using unit groups. Any way would be great.
Depends on how and why you need to avoid unit groups. This does use Unit Group functionality, but I don't see a scenario where this couldn't be used.
The variables are not really needed, but made the code a bit cleaner and easy to read.
Move Random Unit Events Local Variables Units in Region = (Any units in MyRegion owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) <Unit Group> Number of Units in Region = (Number of Living units in Units in Region) <Integer> Random Unit = (Random integer between 1 and Number of Units in Region) <Integer> Conditions Actions Unit - Order (Unit Random Unit from Units in Region) to ( Move targeting MyDestination) (Replace Existing Orders)
ok thanks
Is their a way to move a random unit from a region without using unit groups. Any way would be great.
Depends on how and why you need to avoid unit groups. This does use Unit Group functionality, but I don't see a scenario where this couldn't be used.
The variables are not really needed, but made the code a bit cleaner and easy to read.
ok thanks