• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Attack Animation Spell

Status
Not open for further replies.
Level 17
Joined
Jun 28, 2008
Messages
776
Hey,

I am looking for a way to use the Storm Brewmaster's "attack -2" animation in a spell based of of the channel "dummy" spell.

But when I use attack 2 / attack second / attack, 2 / attack, second/... the animation alternates between his attack 1 and attack 2 animation.

Is there a way to make so that it will play only attack 2?

Thanks in advance
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Each unit has its own set of AnimationIndex.
First, you must know what Index does your animation is.
To know this, here's a test map to ease you work - to find your Index for your desired animation.

Once you know it, apply this function: call SetUnitAnimationByIndex(whichUnit, whichIndex)

Let's say in the test map you got Index of 5 for your desired animation, just change that whichIndex to 5.
 

Attachments

  • SetUnitAnimationByIndex (1).w3x
    12.7 KB · Views: 38
Status
Not open for further replies.
Top