Melee units stop going to target and face archers on a cliff

Eddy

New Member
Reaction score
0
I have ranged units (archers) on a cliff that can be attacked by melee units if the melee units destroy a gate first. I have a trigger ordering a group of melee units to attack move to the position of the gate. The problem is when the melee units begin to pass the cliff in order to attack the gate, the melee units get attacked by the archers and the melee units just stand there and start facing the archers. The melee units stop going towards the gate.

I know one solution is to change the trigger from "attack move" to "attack;" however, I do not want to do that because the melee units encounter other enemy units on their way to the gate. What should I do so the melee units target the gate rather than standing around and crowding the archers. Any suggestions?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
One possibility is to give the gate an attack that deals 0 damage.
If the gate has an attack it will have a higher attack priority.
But! Units still have a higher priority then buildings, so this might still not work in 100% of the cases.
It would be even better to make the Gate a unit and give it an attack that deals 0 damage. This way it will be attacked like any regular unit and the AI will work fine.
However, depending on how you use the gate this might make other parts of your map more difficult to implement.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
You can make a unit is attacked trigger.
C
unit type of attacking unit archer
gate is alive = true
A
order attacked unit to stop
order attacked unit to move to-attack gate
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top