• 🏆 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!

Set next attack animation

Status
Not open for further replies.
Level 25
Joined
Jul 10, 2006
Messages
3,315
Only if it has an animation tag.

You can use
  • Animation - Add animation tag to unit
before the attack starts, and then remove it afterwards.

E.g. Critical Strike/Bash use the unit's "slam" attack animation, so to force that on a normal attack for a unit that has the animation, just add the "slam" animation tag, and remove it again afterwards.
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
You can use this (as Maker said) :
  • Custom script: call SetUnitAnimationByIndex(udg_Caster,5)
It worked for me. When i had to display a certain animation, i found it's index (5 in the example i gave) and i had to get it's length.
For example, i had animation, long around 1.5 seconds. I had to loop the script with the animation for 1.5 seconds. And it worked. I'm not sure if it will work without looping the animation (to call the script only once). Because in my case, i had to loop the animation many times, not just once. So you can try! :)
 
Status
Not open for further replies.
Top