HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggered animations

04-18-2007, 03:02 AM#1
Exilus
How do you make only one variation of animation happens when using triggers?

i would like my footmen to always use the "Attack - 1" animation, but no matter what animation name i write in the "Animation - Play animation for Unit", it always use both Attack - 1 and Attack - 2....

i tried Attack - 1, Attack 1, Attack First.
none seem to block Attack - 2 from occuring.
04-18-2007, 03:08 AM#2
Dil999
Er. 2 ways.
1) Play animation with rarity.
2) Do a trigger like this:
A unit is attacked
Attacking unit is (Your unit)
Make Attacking unit play its attack,1 animation.
04-18-2007, 10:24 AM#3
Hyarion
Actually, you need to use a JASS function to play the animation by its index number. I can't recall the function right now, but I'm pretty sure you can't do it with GUI.
04-18-2007, 04:22 PM#4
Exilus
Anyone has this function? it could be of great help.
04-18-2007, 04:28 PM#5
Ammorth
native SetUnitAnimationByIndex takes unit whichUnit, integer whichAnimation returns nothing
04-18-2007, 05:39 PM#6
Exilus
Thanks. but is it possible to integrate it in a trigger using custom script?

what would it be if i wanted Attack - 1 to be played on Triggering unit? what code line?
04-18-2007, 06:27 PM#7
Hydrolisk
I think the "takes unit WHICHUNIT" part needs to be changed. The WHICHUNIT should be TriggeringUnit or something. Can't remember.
04-18-2007, 06:35 PM#8
Exilus
well for some reason when i enter "native SetUnitAnimationByIndex takes unit TriggerUnit, integer whichAnimation returns nothing", it tells me it doesnt even understand what Native is.
04-18-2007, 06:51 PM#9
Exilus
Fixed my problem. thanks ammorth.