| 09-06-2008, 05:13 PM | #1 | |
Basic Animations
This tutorial contains a brief and simple overview, of unit animations both through triggers and the object editor, as well as their uses. Common Ability/Animation Strings
Common Animation Strings Include:
Modifiers:
To these when you cast an ability, is very simple. For an example I'll look at the Human > Mountain King > Storm Bot You'll notice near the top that it says, Art > Animation Names > spell, throw. If you open up the value, you'll find that it shows two separate strings, 'spell' and 'throw'. The first string ('spell'), assigns at least part of the animation. If you were to delete 'throw' it would play the mountain kings spell animation. Since 'throw' is there, it, in effect, modifies the 'spell' and makes the mountain king play his "spell throw" animation instead. Now, I have a problem for you: What would you do to play the Tauren Warchiefs "slam" animation? Built in Unit Animations When you select a unit, under its art there area a few animation related things. These are:
Now for the combat animations: These can be found under Combat, near the top of the list.
Triggered Animations
Triggering Animations, can be very useful for spell making, cinematics and many visual displays. Some of the most basic commands are: Trigger: Basic Actions![]() Animation - Play <A unit's> stand animation![]() Animation - Play <A unit's> stand animation, using only Common animations![]() Animation - Queue <A unit's> stand animation![]() Animation - Reset <A unit's> animationGeneral advice and tips: - The unit animation is selected using the same method (mentioned earlier in the tutorial) as common animation strings, and abilities. - The selected unit could be: A unit from a unit group (picked unit), a specific variable (<YourUnit>), or an event trigger (ie: Triggering Unit). The commands:
An extra JASS feature: I can't seem to find a GUI equivalent of this, so I'll use the JASS instead. This is what you use to play a looping animation, so it plays more than one time.For example: you cannot play a walk animation with "play <Unit's> walk animation," and to play a walk animation you must use JASS SetUnitAnimationByIndex This is SETUNITANIMATIONBYINDEX. To incorporate this properly into the GUI code, first make a custom script action. Once there, type: call SetUnitAnimationByIndex(unit,integer). The unit will be the unit that you are setting the animation for, and the integer is the Animation ID. This animation ID is in what order the animation appears on the animation list. You can find this out by either looking at it in the World Editor, Wc3viewer or a similar program. The number starts at 0 ignoring Un-animated. JASS:call SetUnitAnimationByIndex(GetTriggerUnit(),4) Another useful link, which can be fun to play around can be found here. Playing Animations Backwards.
|
| 09-06-2008, 07:02 PM | #2 |
And how about playing these animations backwards with triggers? This ought to help you figure it out completely, as I never really did fully figure it out. Edit: And this. You should probably explain how SetUnitAnimationByIndex (not sure of the GUI equivalent) works, and in doing so mention that the "walk" animation cannot be played except with using SetUnitAnimationByIndex. Additionally, I would add stuff about adding animation tags to a unit does (E.G.: Demon Hunter). This is what "Reset Unit Animation" does, so it's pretty useless (also your description is wrong): JASS:function ResetUnitAnimation takes unit whichUnit returns nothing call SetUnitAnimation(whichUnit, "stand") endfunction |
| 09-06-2008, 07:09 PM | #3 |
Oh. . . I'll fix that up. Updated with additional tags, also. |
| 09-09-2008, 02:34 AM | #4 |
Wow, you sure are proflicicl;ds.a.fd.... prolific. Good work. |
| 09-09-2008, 09:25 PM | #5 |
Mmmm, I often take a break from my projects, and am looking for something to do. Pyrogasm suggested a Basic Anomation Tutorial, so here we are. |
| 10-08-2008, 06:54 PM | #6 | |
Quote:
Cast Backswing/Point are likewise pporly explained. When a unit beins casting a spell, it starts playing it's spell animation first, then, after cast-point seconds, the spell will actually be cast (if the unit is not interrupted in the meantime by another order or a stun effect) and then the unit will continue to play it's cast animation for cast-backswing seconds before going back to standing (again, unless it's interrupted earlier). Run speed is not the speed at which the walk animation is played, rather it says what distance the unit travels in one walk animation loop. The game then uses this information to calculate the animation speed when the unit is walking based on it's movement speed, so if you give your unit a higher movement speed you don't need to change the animation-run speed at all. Furthermore, you still have no information about the SetUnitAnimationByIndex native function even though Pyrogasm already asked you to do that. |
| 10-08-2008, 09:04 PM | #7 |
It seems that this tutorial has slipped my mind temporarily. As of now, I'm busy with some of my contests, and will get around to this as soon as possible. If someone else is at all interested in developing this further, I offer what I have to them: No credits required, or wanted. |
| 10-08-2008, 09:51 PM | #8 |
With the problems mentioned by Anitarf fixed, it will definitely be approvable. |
| 10-17-2008, 11:51 PM | #9 |
~Updated. |
| 10-18-2008, 05:15 AM | #10 |
I would change every "No Unit" into "<A unit>" to show exactly what is going on in each function. In addition, in your section about SetUnitAnimationByIndex, use some [ljass] tags and mention this: you cannot play a walk animation with "play <Unit's> walk animation," and to play a walk animation you must use SetUnitAnimationByIndex. |
| 10-18-2008, 05:57 AM | #11 |
Fixed |
| 11-05-2008, 10:15 AM | #12 |
I hope this question isn't "noobish", but can all the animations have more than one variation? Like, say "Stand" can have "Stand - 2" and so on; Can "Birth" or "Spell" or "Death" animations be varied? |
| 11-05-2008, 12:09 PM | #13 |
That is actually a good point. It all depends on the model, and its animation set. EDIT: Pitzer? |
| 11-16-2008, 06:20 PM | #14 |
Undoubtedly approved! |
| 11-16-2008, 06:21 PM | #15 |
Thanks -- and Pyro, Sorry about the backwards animations. :P |
