Using Animations

Tutorial By PandaMine

PandaMines Tutorial To Using Animations v1.00
The following tutorial will tell you how to use unit animations through the Object Editor or Trigger Editor, it will even tell you how to do specific unit animations (through trigger editor) and replace animations done through the Object Editor

You Will Need
World Editor or World Editor Unlimited
Basic WE Knowledge
Medium Trigger Knowledge
WC3 Viewer

NOTE: Some of the terminology I made up myself in this guide so it is easier for readers to understand the animations, the real terms can differ

What are animations?
Animations is the movements played by a model when WE gives the model certain command. By default when units aren’t doing anything they play the “stand” animation and when they are given orders they play a specific or variation of an animation. Animations differ from model to model, however each model support by WE has specific animations which will be explained

Viewing Animations
There are many tools for viewing models (such as Warcraft 3 Viewer and Warcraft 3 Model Editor) however the easiest way to view animations is the one inbuilt into the WE. Below is a screenshot of where the Model Viewer is located, it is located on the left side of the World Editor Main Window and will display the model of the current unit/doodad/destructible/model seletected
Animation: Tells you the current animation that is playing, it also tells you how long the animation takes in seconds (in this case its 2.833 seconds)
Distance: Allows you to change how distant the model looks in the view
Rotate: Allows you to rotate the model
Lighting: Allows you to change the lighting

What are the different type of animations?
Listed below are the different types of animations and their specific animations. Animations are divided into 2 parts, there is the animation type which is then followed by a specific animation. The animation type has to be the same for each model but the specific animations can differ. If the WE is told just to do an animation type it will do a random animation from that type, however if it is followed by a certain specific animation then it will play that animation. In most cases the specific animations are followed by an integer such as “attack – 2” or “stand - 3” or use WE animation names such as “slam” or “channel”

Attack: This animation is played when a unit is ordered to attack and the attacking unit is within Combat Range
Birth: This animation is played when a Unit is spawned or summoned. NOTE: that it does not play when a unit is created through the Create 1 Unit for Player at Point Facing Degrees/Point Function
Death: This animation is played when a unit dies, like with Birth it doesn’t play when the unit is removed through the Remove Unit function, it however will play with the Unit Explode Function
Decay: This plays when a unit that isn’t a hero or a building dies. The animation in most cases are the bones of the model
Dissipate: This animation replaces the Decay animation for Units that are heroes. In most cases it’s the hero rising into the air
Morph: This replaces the normal animations when a Unit is morphed by an ability. In most cases this animation has the “morphed” variations of the “attack”, “death”, “stand” and “walk” animations which replace the normal animations until the unit is morphed back
Spell: This animation is played when a unit starts casting a spell
Stand: This animation is played when the unit doesn’t have any command from WE (i.e. is standing)
Walk: This animation is played when a unit is ordered to move

What are the specific Animations?
You may have noticed that a model has certain different types of the animations such as “attack – slam” or “stand - channel”. These animation names are inbuilt by the World Editor to be played when a specific order is given (in most cases its spells). There are 2 types of specific animations, normal Specific Animations and Random Specific Animations.
Specific Animations
These animations are often used with “birth”, “walk”, “spell”, “death” and “dissipate” animations. When called by the WE, they will only play that one animation. As an example when a unit casts the “Chain Lightning Spell” by default it calls the unit to play the “spell – chain” animation
Random Animations
These animations are played by random within an animation type. The are always characterized with integers after the animation name. These animations are often used with “attack” and “stand” animations. As an example when a unit is ordered to attack another unit, it will play either the “attack – 1”, “attack – 2” or “attack – 3” animations.
NOTE: In actual fact, the animations aren’t totally random, the “attack – 1” animation has a common chance of played where as the “attack – 2” has a rare chance of being played. The common and rare terms are used in GUI/Jass and will be explained later on

Animations with the Object Editor
Animations are used within the object editor when dealing with abilities. All other animations such as walk, attack, death etc are inbuilt into WE and can only be changed with GUI/Jass. The string/s that stores the animation names is shown below and multiple strings are separated by a comma
As you can see it can store multiple strings and this is used with specific animations. If you want to change the animation, the first string you enter will always be the animation type i.e. “attack”, “stand” or “spell”. If this is the only animation you enter it will play
a) If it is a specific animation the first specific animation (i.e. “spell”, “birth” or “death”)
b) If it is a random animation it will play one of random animations (i.e. “attack” will cause to play one of the attack animations”)
You then can add a second string, which is used to play a certain specific animation. The second string must contain the 2nd part of the animation name (after the – symbol). Some common specific animation names are “channel”, “slam”, “alternate” etc
NOTE: You CANNOT specify which random animation you want to play with the Object Editor, this can only be done through GUI/Jass

If the animation for the first string doesn’t exist, then it will play the “spell animation”, if the animation doesn’t exist for the second string then it will play the first string
Some Examples
“spell”: Will play the spell animation
“spell,channel”: Will play the spell channel animation
“attack”: Will play one of the attack animations
“fly”: Since this animation is not a valid animation, it will play the “spell”animation
“spell,chain” Lets assume that you changed the model of the unit using this ability from the Far Seer model to another one. Since Far Seer is the only Blizzard Model with the Spell Chain animation it will only play the first specific “spell” animation

Animations with Triggers
Triggers give you full grasp of the animation capabilities. Jass isn’t required in animations except for one function which can be used with a custom script (or is included in World Editor Unlimited). Listed below are the different animation functions

Play Unit Animation: Does the exact same as the Object Editor’s Art - Animation Names. Can play specific animations but not random animations
Play Unit Animation (Specify Rarity): When dealing with Random Animations, it will allow you to either play the rare or common animation. In most cases the common animation is the usually “attack – 1” where as the rare animation is “attack – 2” or “attack – 3”. This has no effect on Specific Animations (it will just play the specific animation)
Queue Unit Animation: Causes a unit not to play any other animations until it plays the specified animation
Reset Unit Animation: Causes the unit to play the animation it is supposed to be playing (i.e. if you caused a unit to play the “spell” animation and you used this function, it would cause the unit to play the “stand” animation if it is currently standing)
Add/Remove Animation Tags: Animation tags are just the same as custom values but there just animations, you can add/remove an animation tag to a unit which you can then play later
Change Unit Animation Speed: Does exactly what it says, sets the animation speed to a percentage (is quite handy for matrix or lightning quick effects) causing any future animations made by that unit to play at that speed.
NOTE: Once your trigger is finished what its supposed to be doing don’t forgot to set the animation speed back to 100%
Play Destructible Animation: Same as Play Unit Animation but with Destructible’s
Queue Destructible Animation: Same as Queue Unit Animation but with Destructible’s
Change Destructible Animation Speed: Same as Change Unit Animation speed but with Destructible’s
Play Animation For Doodads in Region: Plays all the animations for all the Doodads in a certain region
Play Animation For Doodads in Region: Same as Play Animation For Doodads in Region but with a circle

The Set Unit Animation by Index Function
Unfortunately but not surprisingly Blizzard forgot to put the Set Unit Animation by Index into GUI. This means you have to use the Custom Script Action. You could also use World Editor Unlimited by Pitzermike which has the Set Unit Animation by Index as an added action.

The function basically allows you to play ANY specific animation for a unit. It doesn’t take into account any strings or “rare” and “common” values, it just takes into account an Integer which is the number of the animation. The problem many people have with this function is that the order of the animations is NOT the same as the order in the Model Viewer inbuilt into WE. This is because the WE viewer automatically re-arranges the animations into the “stand”, “walk”, “attack”, “death”, “decay”, “dissipate”, “morph” and “birth” order.
In order to determine which Index to use, you can use Warcraft 3 Viewer. Open the model in Warcraft 3 Viewer and open the Treeview Window (CTRL + H). In the Animation section you will see the various animations, the order in which they are in is the same as the Integer you would use. Have a look at the screenshot below for an example
Using the same example for the Archmage, if we want to play the “Attack – 1” animation using the Set Unit Animation by Index function you would use the number 4 since it’s the 5th number down from the list and 0 is the first integer. In this case however its simpler to use the Play Unit Animation function since there is only one “attack” animation type.
Custom Script: call SetUnitAnimationByIndex(unit,integer)
This is the custom script you would use, below is an example


This is the custom script you would use cause the unit assigned to the variable tempunit to play the 3rd Animation. If you are using Jass it also supports local variables

If you have World Editor Unlimited you would use the following action


How do I make play a specific animation when a unit casts an ability
Many people seem to have this problem, and I have also had it. The problem is the Object Editor doesn’t allow you to play definite animations (it doesn’t support the SetUnitAnimationByIndex function) so it means you would have to trigger the ability. That however isn’t the main problem which is that when a unit is given 2 commands to play an animation at the exact same time, only the first animation called is played. Object Editor functions are always called before the corresponding Trigger Action, so using the following trigger will not work as it will only play the animation specified in the Object Editor


What you would need to do is add in a Wait function of 0.01 seconds. This is virtually undistinguishable to the human eye however it allows you to play the animation. For further accuracy you would also want to increase the Duration of the base ability by 0.01. It would also be a good idea to set the Art – Animation Names to “stand” so you do not see a sudden twitch in the animation


This is the correct version of the trigger. Likewise you could do the same with common/rare animations and play animation Tags, but in all other situations just change the Art – Animation Names in the Object Editor. From this you have also learnt you cannot replace animations, you have to override the animation by making it play an animation 0.01 seconds after the replacing animation

My Unit Animations Isn’t Play At All
Here is a checklist for most of the common problems
1. Does the animation exist?
2. Is the unit being given any orders when the animation is being played
3. Is there a queued unit animation
4. If referring to a Animation Tag, did you add that animation tag

My animations aren’t playing at the right speed
You have some Trigger that caused that unit to increase/decrease its attack speed and you obviously forgot to set it to 100%. Remember to set the unit animation speed to 100% when your finished with the trigger

How do I play the Birth Animation when a unit is created
Just simply tell the last created unit to play the animation


How do I play the Death Animation when I use Remove Unit
The easiest solution is to use the Explode Unit function (which displays the Death Animation). If for some reason you need to use the Remove Unit function then you would need to note down the duration of the death animation and use the following trigger


The locust ability is added to the unit so it cannot be selected and to remove the health bar while its dying. The units “death” animation is then played, a wait is added in which is the same duration as the “death” animation. The unit is then removed and a corpse is left behind at the position of the unit

More Questions and Answers will be added when people reply

Click here to comment on this tutorial.
Blizzard Entertainment, Inc.
Silkroad Online Forums
Team Griffonrawl Trains Muay Thai and MMA fighters in Ohio.
Apex Steel Pipe - Buys and sells Steel Pipe.