• 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.

play unit animation

Status
Not open for further replies.

007

007

Level 6
Joined
May 3, 2009
Messages
175
in the trigger editor i can play any units animations. but as some units have more than 1 stand or attack animation i dont know how to play these. i tried everything (stand - 1, stand1, stand 1, stand -1, stand-1) and maybe more but it didnt work.
 
  • Set Unit = (Your unit)
  • Custom script: call SetUnitAnimationByIndex (udg_Unit, 0)
This will play your unit's animation. Experiment with the value 0. Animations in modelling begin from 0 ... to the number of animations the unit has. Notice, if you find the animation and it's the fourth one, with this custom script it will be 3. To get your unit's animations, convert the model to MDL via the MDLX tool and scroll to Animations Sequence section. Alternatively, switch from 0 to any other number (lower than 10, most likely, unless it's a building), until you get the desired animation.
 

007

007

Level 6
Joined
May 3, 2009
Messages
175
i suppose i have to replace the "udg_Unit" with the variable of my unit, right? but that did not work. the trigger was deactivated, because something was wrong.
 
Status
Not open for further replies.
Top