I wasn't too sure if this was a object editor or trigger problem but I think it's an object editor related issue so I'll post here.
I'm trying to play a unit animation from trigger on spellcast but no matter what I do, it only plays the animation that's set in Art - Animation Names. The spell is based on channel. Is there like some sort of override option in object editor that forces only animations from trigger to play? Here's the relevant snippet of the code:
I'm trying to play a unit animation from trigger on spellcast but no matter what I do, it only plays the animation that's set in Art - Animation Names. The spell is based on channel. Is there like some sort of override option in object editor that forces only animations from trigger to play? Here's the relevant snippet of the code:
JASS:
library SPELLTEST initializer OnInit requires SpellEvent, TimerUtils, GroupFilter, Damage
globals
private constant integer ABILITY_ID = 'A00C'
endglobals
private function OnCast takes nothing returns nothing
local unit caster = GetTriggerUnit()
call SetUnitAnimation(caster, "Spell Three") //Does not play no matter what
set caster = null
endfunction
private function OnInit takes nothing returns nothing
call RegisterSpellCastEvent(ABILITY_ID, function OnCast)
endfunction
endlibrary