I am trying to figure out how I can order all of the units on the map owned by a player (in this case brown) to attack-move to the nearest unit in a certain unit group.
How do I go about this?
I tired that, but it didn't work. It just moves to one of the units in the group.
How do I go about this?
Trigger:
- Move
- Events
- Time - Every 8.00 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in Units and do (Actions)
- Loop - Actions
- Set tmpPoint = (Position of (Picked unit))
- Loop - Actions
- Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 12 (Brown)) and do (Actions)
- Loop - Actions
- Unit - Order (Picked unit) to Attack-Move To tmpPoint
- Loop - Actions
- Unit Group - Pick every unit in Units and do (Actions)
- Events
I tired that, but it didn't work. It just moves to one of the units in the group.