- Joined
- Mar 24, 2020
- Messages
- 80
Hi guys,
Can someone help me create a trigger that picks every unit in a group, creates a point variable (for each unit) and then issues each individual the order to attack move?
I've managed to get them to target a single point, but I need a loop or something that recreates the random location for each unit in a way that it doesn't leak.
The below works, but obviously has the location leak.
Can someone help me create a trigger that picks every unit in a group, creates a point variable (for each unit) and then issues each individual the order to attack move?
I've managed to get them to target a single point, but I need a loop or something that recreates the random location for each unit in a way that it doesn't leak.
The below works, but obviously has the location leak.
-
Refresh
-
Events
-
Time - Every 2.00 seconds of game time
-
-
Conditions
-
Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green) matching ((Issued order) Equal to (Order(stop))).) and do (Unit - Order (Picked unit) to Attack-Move To (Random point in (Playable map area)))
-
-
-
Refresh
-
Events
-
Time - Every 2.00 seconds of game time
-
-
Conditions
-
Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Set VariableSet SpawnLocation = (Random point in (Playable map area))
-
Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green) matching ((Issued order) Equal to (Order(stop))).) and do (Unit - Order (Picked unit) to Attack-Move To (Spawn Location)
-
Custom script: call RemoveLocation(udg_SpawnLocation)
-
-