[JASS] Canceling an Animation

Status
Not open for further replies.
Level 4
Joined
Jun 8, 2007
Messages
89
I have a question about unit animations.
Currently, I have:

JASS:
    // set to the beastmaster attack animation
    call SetUnitAnimation(ld.caster, "stand")
    call SetUnitTimeScale(ld.caster, 0.25)
    call SetUnitAnimationByIndex(ld.caster, 3)
However, my problem is that the unit still shows the cast animation on casting the spell in which this Jass code has been extracted. I tried to cancel this cast animation by using the "call SetUnitAnimation(ld.caster, "stand")", but that did not work (I hadn't really thought it would, just hoped).
My question then, I suppose, is how would I go about canceling the cast animation and going immediately to the animation I desire (animation index of 3 as shown above)?

Thanks for any help in advance!
 
I don't think a unit can cancel an animation. But you can tell him, to move to some place and, It will cancel automatically.

I tried replacing the first line above (setting the unit animation to stand) with:
JASS:
call IssuePointOrder(ld.caster, "move", GetUnitX(ld.caster), GetUnitY(ld.caster))
and that still doesn't seem to work. Am I doing something wrong?
 
If you want to replace spells casting animation with something else, you can use SPELL_CAST -event and 0.0 timer to set the new animation.
 
Status
Not open for further replies.
Back
Top