• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Wanting movement to trigger attack cooldown

Status
Not open for further replies.
Level 11
Joined
Mar 31, 2009
Messages
732
I want it so that when a unit stops moving, all of its attacks go on cooldown for the normal cooldown of their attacks. This way, a unit will have to wait one attack cooldown cycle before it can attack again, after it finishes movement.

How would I go about this in the data editor? So much overwhelming information there.

I want it to apply to every unit on the map, so can it be done by editing the Move ability, or the Ground mover?
 
Level 11
Joined
Mar 31, 2009
Messages
732
I've got a behaviour to apply while a unit is moving by using an isMoving validator to disable it while the unit is not moving, but how do I make the behaviour stay on for a short amount of time after it stops moving?

If I give it a short duration, then how do I make it reapply after the unit starts moving again?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
Well one way would be to periodically apply a temporary behaviour while the unit is moving. As the behaviour is refreshed it will not expire and will only expire briefly after the refreshing stops. As the unit cannot attack and move anyway you could use that behaviour to test if the unit has briefly stopped.

The periodic nature to it may or may not be viable if a large number of such units exist at a time (you need to benchmark the performance for your particular map).
 
Status
Not open for further replies.
Top