DarkWandererAmon Posted June 14 Posted June 14 Hey all I am trying to create a script so that when an actor is hit by a spell, that actor plays an animation. Bool property CeaseBlocking auto String property StopAnimation auto Bool property CeaseAttacking auto String property PlayAnimation auto function OnEffectFinish(Actor akTarget, Actor akCaster) if !akTarget.IsDead() debug.SendAnimationEvent(akTarget as objectreference, StopAnimation) endIf endFunction function OnEffectStart(Actor akTarget, Actor akCaster) if CeaseBlocking debug.SendAnimationEvent(akTarget as objectreference, "AttackStop") endIf if CeaseAttacking debug.SendAnimationEvent(akTarget as objectreference, "BlockStop") endIf debug.SendAnimationEvent(akTarget as objectreference, PlayAnimation) endFunction But for some reason I cannot get it to work. Any help is appreciated. The script compiles but nothing happens in game
Sphered Posted June 18 Posted June 18 Make sure your magiceffect script even starts at all. Depending how your effect and spell are setup, you might require a duration on the spell to be at least one second to get script actions to happen If that isn't the issue, you might have animation prereqs to workaround. Def make sure it is even triggering the event at all first though IMO. Like a messagebox or something
DarkWandererAmon Posted June 19 Author Posted June 19 18 hours ago, Sphered said: Make sure your magiceffect script even starts at all. Depending how your effect and spell are setup, you might require a duration on the spell to be at least one second to get script actions to happen If that isn't the issue, you might have animation prereqs to workaround. Def make sure it is even triggering the event at all first though IMO. Like a messagebox or something Thank you I ended up using a different script and it worked perfectly! Thank you so much for answering Sphered!
Recommended Posts