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

[Solved] [HELP] Play an unit's animation?

Status
Not open for further replies.
Level 9
Joined
Aug 7, 2009
Messages
380
hello there,..
I want to ask about animations today,..
what to use when it's animation tag is "stand - 2"? in "Animation - Play unit's ??? animation" ??
Stand 2? or Stand two?
As same as attack, etc...
If you need more infomation, just ask
I can't explain it well..
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
These additions work like variations or modifiers. You cannot specify them exactly. Stand - 2 belongs to the stand group. There is a Play Unit Animation With Rarity action, each animation is a rarity assigned, like the Footman drinks sometimes from his bottle, which is a stand animation but much more often executes the other stuff. Play With Rarity can favor "rare" or "often" animations within a group but that is kind of imprecise.

To properly make the unit play a certain animation, use the Jass function
JASS:
native SetUnitAnimationByIndex takes unit whichUnit, integer whichAnimation returns nothing
Animations have a numeric id, counting upwards, starting with 0. This id can be read out from the model. In case you are not familiar with modelling, may as well try the numbers out.
 
Status
Not open for further replies.
Top