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

Help with unit's walk animation when force moving!

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
930
Ok when im force moving a unit i cant use this trigger
  • Animation - play Buddah's Walk animation
it just does to the normal Stand Animation -.-

And i got a tip from my friend to use this
JASS:
SetUnitAnimationByIndex
But how in the world im a supposed to use that?? someome please help!
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
Each unit has a unique set of animation indexes (0, up to numAnimations-1) for their animations, which that function can be used to call.

To find out the walk index for a unit, you pretty much have to brute force it. You could also make a trigger which, for example, set a unit's animation to the index typed in every type the player typed a chat message.

As for the actual function use, for example, call SetUnitAnimationByIndex(myUnit,5) would play the unit's 6th animation.


If you aren't going to specify either GUI or Jass, please just don't tag the thread.

~Thread tag (and pseudo-tag in the title) removed
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
I dont think SetUnitAnimationByIndex will work either for this
Thing you should do is moving unit by
SetUnitX
SetUnitY functions
Those dont interrupt animation and attacking they just move
 
Status
Not open for further replies.
Top