HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell - Unit Animation - trouble

01-16-2007, 04:28 PM#1
Fulla
Spell - Great Cleave
Simply an AoE damage spell around caster.

Im having difficulty maknig the Unit play his attack animation thou.
The unit is a:

Felgaurd / Bloodfiend / Overlord
Or if you dont know what that is - (Rogueknight - Sven) from Dota

His 2 attack animations are
"Attack - 1"
"Attack - 2"

Neither of these dont seem to work?
Ive tried both in the
- Spell Animation Names
- Inside trigger, forcing unit to play animation.

Any ideas?
01-16-2007, 04:34 PM#2
Rising_Dusk
Quote:
Originally Posted by Me
I sometimes forget that anyother function exists.
Collapse JASS:
call SetUnitAnimationByIndex(YourUnit, SomeInteger)
Trigger:
Events
Conditions
Collapse Actions
Set YourUnit = WhateverUnitYouWantToChangeAnimationsFor
Custom Script - call SetUnitAnimationByIndex(udg_YourUnit, 1234)
To get the animation index of your model, just open it's MDL in notepad or something and count from the top of the animation list to whatever animation you want to play.
Don't trust Magos or something else, since those organize alphabetically, not by index.
Although I must say --
You should be able to play 'attack' in a spell's animation settings.
It just randomly picks one of the attacks to play is all.

If you want to play a SPECIFIC one every time, use the above function.
01-16-2007, 04:40 PM#3
emjlr3
in game have a debug message

so say u type -anim

take your unit, and loop from 0-10, using SetUnitAnimationByIndex for the loop number

this will show u what index to use for what animation

remember to put waits in your loop so u can actually see what the animation is
01-16-2007, 05:08 PM#4
Rising_Dusk
You could also open the MDL and just look at it.
That's how I do it, anyways.
01-16-2007, 05:25 PM#5
Fulla
thx guy, got it now