Preventing auto-attack

Dinowc

don't expect anything, prepare for everything
Reaction score
223
How to prevent a unit from auto-attacking a target? I mean it wont attack until it is issued an order to do so, no matter if it is attacked by another unit
 

kingkwong92

Well-Known Member
Reaction score
25
Set the accusition Range to the same as your range, that will stop it chasing other units unless they are in range.
If you want them to not attack unless told you can:
Give them an ability which will add or remove the orb ability. Set in the object editor no attacks enabled. Change the data on the orb to allow attack 1. When the orb is given the unit will be able to attack when it is removed you won't be able to attack. Also uncheck Can Flee for the unit or it will keep running away since it cannot attack. You can link it with order = attack, give orb. Order = stop, remove orb. Negative side is that you can't see your attack when you don't have the orb. You could just trigger the whole thing and save if the unit can attack or not in a boolean variable
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
yeah that works

now the problem is, I can't see unit's damage, even with the orb ability, there's just some black space :/
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
nvm I've found a nice and effective way to do exactly what I was trying to achieve :)

I've just added an event "Unit acquires a target" with an action to order him to hold position
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top