I'm trying to get units to move with the main unit, but want them to attack any enemies that are nearby. I may be going about this the wrong way and perhaps I need it to be a 'periodic event' instead of 'issued an order' event, but I'm really unsure.
However, the overall goal is simple, I want to have a group of units of a certain type, attack-move around the owner of a particular unit and at the same time, not all move to the same location. I want them to move to random locations around that unit ranging from 100-500 range.
Anyone have any ideas and able to help?
I'm guessing I need to set the location of the unit I want them to move with into a variable, but it's the rest that confuses me.
Here is my code so far:
However, the overall goal is simple, I want to have a group of units of a certain type, attack-move around the owner of a particular unit and at the same time, not all move to the same location. I want them to move to random locations around that unit ranging from 100-500 range.
Anyone have any ideas and able to help?
I'm guessing I need to set the location of the unit I want them to move with into a variable, but it's the rest that confuses me.
Here is my code so far:
Trigger:
- Trigger
- Events
- Unit - A unit Is issued an order targeting a point
- Conditions
- (Owner of (Triggering unit)) Equal to (Owner of Unit)
- Or - Any (Conditions) are true
- Conditions
- (Unit-type of (Triggering unit)) Equal to Hero
- Conditions
- Actions
- Unit Group - Pick every unit in (Units within 540.00 of (Position of (Triggering unit)) matching ((Unit-type of (Picked unit)) Equal to Helping Unit)) and do (Unit - Order (Picked unit) to Attack-Move To (Position of (Triggering unit)))
- Events