• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Trigger Executes When Unit/Doodad is playing a specific animation

Status
Not open for further replies.
Level 11
Joined
Nov 25, 2014
Messages
526
As above. How would the trigger be? There is a trigger where when UnitX is close to another unit/doodad, it will play death animation. When UnitX approaches the unit/doodad again, it won't fire unless the unit/doodad is playing stand animation.

Example:
A passes by B, if B is playing stand animation, B will now play death animation and 20 Gold is deducted. When A passes by B again, and B is now playing death animation, no gold is deducted.

SO basically, I need an animation condition.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
There is no such function. All natives only allow setting an animation, not getting it.
You have to keep track of the animations yourself. For example when the unitX comes close to another unit, you store in a hashtable (for example), that unitX plays its death animation. You also start a timer, that lasts as long as the death animation and when the timer expires, you store that the unit is playing its stand animation. This way you know whenever death animation is played.
 
Status
Not open for further replies.
Top