• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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