Unit animations

Status
Not open for further replies.
Level 4
Joined
Nov 9, 2005
Messages
113
Why do triggers never play a unit's correct animation?
A trigger like:

E - whatever
C - none
A - play xxx's 'attack slam' animation

or 'attack - 2' or 'attack'
I know you have to type it yourself as a string and I
triple-checked the animation names of the unit and typed
it 100 different ways. Still, it always plays the wrong
animation. Please, help me.
 
No, salm could also play spell slam. Anyway, I want to play different attack animations. Like 'attack' and 'attack - 2'.
 
Just insert a custom script action in to your code and enter:
call SetUnitAnimationByIndex( unit, number )

Replace "unit" with a unit. The easiest way to do that is to set a unit variable and then enter the variable's name just with the prefix "udg_". To refer directly to a unit you have to know its exactly name. To find it out, make a new trigger without events or conditions and make an "Remove unit" action for the unit you want. Convert the trigger to custom text (Menu 'Edit') and copy it's name, it's a combination of prefix, some letters and a number, you'll find it in the brackets after "call RemoveUnit". After copying you can of course remove the trigger, since it is senseless.
For the number, type in the number of the animation. To find out the right one, open the model in Warcraft III Viewer and count the animations from top to down beginning with 0 or just try.

I hope this will help you!
Greetings,
Waldbaer
 
Status
Not open for further replies.
Back
Top