• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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