I have a melee unit with an ability called "Devistation". This is a melee ability that targets an enemy unit and deals AOE damage around the target. I'm trying to get my player character to play a special animation when this ability is used. Currently it isn't working as intended. When the ability is used I want my unit to stop his current animation, move into range, execute the ability, then resume attacking.
Events
Abil.Devistation.SourcePrepStart
AnimPlay Spells S
The unit instead just stays in the stand animation for the duration of the ability. Then resumes the melee attack animation.
The animation plays fine in other non-ability situations.
Is there something I am missing in this chain of events? Do I need to cancel another animation before I can play the one I'm trying to use?
Since it's also within the scope of my questions, what exactly does the AnimClear command do? I noticed that it is present as a response to the movement event and clears all "Spells" animation. Removing it didn't fix the problem.
AnimClear does exactly as you stated. Let's say you have your spell, and it's a "channeled" spell/ability. Well, it will play the animation for X duration. If you move during this Channel phase but did not setup an AnimClear to trigger on Movement, your unit will move around but be stuck in the Spells animation until the duration is done. Setting the AnimClear will make it so that your unit will stop/clear the spell anim and move as normal instead of 'sliding' around, stuck in the spell anim.
I gave that a try, still no luck. I have a sneaking suspicion that something is taking priority over the animation I'm not really sure where to look though.
I have a melee unit with an ability called "Devistation". This is a melee ability that targets an enemy unit and deals AOE damage around the target. I'm trying to get my player character to play a special animation when this ability is used. Currently it isn't working as intended. When the ability is used I want my unit to stop his current animation, move into range, execute the ability, then resume attacking.
The unit instead just stays in the stand animation for the duration of the ability. Then resumes the melee attack animation. The animation plays fine in other non-ability situations.
Is there something I am missing in this chain of events? Do I need to cancel another animation before I can play the one I'm trying to use? Since it's also within the scope of my questions, what exactly does the AnimClear command do? I noticed that it is present as a response to the movement event and clears all "Spells" animation. Removing it didn't fix the problem.
@Cortk: Go
Try SourceCASTstart
AnimClear does exactly as you stated. Let's say you have your spell, and it's a "channeled" spell/ability. Well, it will play the animation for X duration. If you move during this Channel phase but did not setup an AnimClear to trigger on Movement, your unit will move around but be stuck in the Spells animation until the duration is done. Setting the AnimClear will make it so that your unit will stop/clear the spell anim and move as normal instead of 'sliding' around, stuck in the spell anim.
@BorgDragon: Go
I gave that a try, still no luck. I have a sneaking suspicion that something is taking priority over the animation I'm not really sure where to look though.
Can always throw in some Validate Unit terms to all animation modifying actions.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg