HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Channel ability -> play animation

03-18-2006, 08:24 PM#1
FriendlyWarlord
What I want to do is make a unit start playing an animation as soon as it starts channeling an ability. I have two similar triggers, and they both have the same problem - the triggers are supposed to tell the unit to start the animation, but it's completely ignored because the unit starts playing the stand animation for some reason (if it's in the middle of the stand animation, it immediately goes back to the start of the animation). It does this all the time, and I can't seem to find any way to override it. The rest of the trigger works perfectly, and it's not a typo (it does this in two completely seperate triggers). I'm also using WEU (with 99% GUI), and have tried 'queue unit animation' too, and changing the 'animation' field in the ability only plays it after it's finished channelling... Any ideas?
03-18-2006, 08:44 PM#2
shadow1500
Did u try waiting 0.01 sec and then playing it?
03-19-2006, 04:27 AM#3
FriendlyWarlord
I'm sure that would work, but the .01 seconds would probably take a lot longer than that, so then it wouldn't look too great =[ There are other ways of waiting .01 seconds, but it seems like a lot of work just for a simple animation... that'll be a last resort I guess.
03-19-2006, 05:32 AM#4
paidan_fain
I believe there is a field in Object Editor that allows you to add animation tags to the spell. That would be the best way.
03-19-2006, 08:01 PM#5
FriendlyWarlord
Quote:
and changing the 'animation' field in the ability only plays it after it's finished channelling...
Already tried it =[
03-19-2006, 11:06 PM#6
Blade.dk
Well, there is always the SetUnitAnimationIndex native, that should work.

Just use it like this:

Collapse JASS:
call SetUnitAnimationByIndex(unit who, integer index)

unit who is of course the unit which animation you want to set, integer index is the index of the animation. Animation indexes goes from 0-(number of animations-1). You can always just try with different numbers till you get the correct one, or you can convert the model to mdl format and then find the number of the animation in the mdl file, starting from 0.

This method usually works.
03-23-2006, 04:22 AM#7
FriendlyWarlord
I thought it was going to work, but then it didn't (it did the same thing as the other animaiton trigger), thanks anyway. I guess I'll have to use the wait .01 seconds thing (or .01 second countdown timer or whatever) =\