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

[Trigger] Play a specific unit animation?

Status
Not open for further replies.
Level 4
Joined
Apr 9, 2011
Messages
84
Hey Guys,

this is a problem I've tried to solve for long, but I've never managed to solve it.
So:

I want to play a specific stand animation of a Militia (Stand -4). The "Play Animation" Trigger doesn't work, I mean, it just does nothing. Is there a way to play unit animations like Stand -4 and so on?

Greetings, Renschi
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Try using the JASS function SetUnitAnimationByIndex and go from 0 up until you find the correct index of the Militia's stand-4 animation.

Do you need help on how to implement this JASS?
 
you can do it in GUI using the GUI action "Custom script", under the general tab...

though you would need to do trial and error on this...

  • Actions
    • Custom script: call SetUnitAnimationByIndex( unit YourMilitia, integer animationindex)
just change unit YourMilitia to the variable pertaining to the militia, and play with the value of integer animationindex
 
Status
Not open for further replies.
Top