View Full Version : Wanting movement to trigger attack cooldown
06-01-2012, 07:54 AM
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?
Dr Super Good
06-03-2012, 01:47 AM
What you could do is add a test to the unit's weapons effect chain that cancels any damage and visuals if the unit has just stopped moving (a behaviour check as you could make a behaviour only appear briefly when the unit stops moving).
06-03-2012, 03:59 AM
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?
Dr Super Good
06-03-2012, 04:19 PM
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).
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO