I have a trigger which runs periodically to order units in an areana style map
to move to random points within that area. The trigger:
I want each unit to have its own generated random point. Could anybody help me please?
to move to random points within that area. The trigger:
-
Unit AI
-
Events
- Time - Every 5.00 seconds of game time
- Conditions
-
Actions
- Set PlayerPatrol = (Units owned by Neutral Hostile)
- Unit Group - Pick every unit in PlayerPatrol and do (Unit - Order (Picked unit) to Patrol To (Random point in Battle Order <gen>))
- Custom script: call DestroyGroup (udg_PlayerPatrol)
-
Events
-
Unit AI Copy
-
Events
- Time - Every 5.00 seconds of game time
- Conditions
-
Actions
- Set PlayerPatrol = (Units owned by Neutral Hostile)
- Set TempPoint = (Random point in Battle Order <gen>)
- Unit Group - Pick every unit in PlayerPatrol and do (Unit - Order (Picked unit) to Patrol To TempPoint)
- Custom script: call DestroyGroup (udg_PlayerPatrol)
- Custom script: call RemoveLocation (udg_TempPoint)
-
Events
I want each unit to have its own generated random point. Could anybody help me please?