Hey everyone,
I'm trying to write a script that will cause a spell to cast on the player when they kill anything (rabbit, bandit, dragon, etc.)
I need a script because I don't think there is any other way to make a 'constant magic effect' (for armor) contain a 'fire and forget effect' type spell.
The closest script, in concept, to what I'm trying to do is the one for Dawnbreaker, this is my adaptation.
Scriptname KARestoreStaminaSCRIPT extends ActiveMagicEffect
Spell Property RestoreStaminaAll Auto
Event OnDying Actor(Actor akKiller, Form akSource, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked )
Actor TargetActor = GetTargetActor()
; ; debug.trace(self + "OnDeath() casting RestoreStaminaAll from Target Actor:" + TargetActor)
RestoreStaminaAll.Cast(TargetActor, None)
EndEvent
How do I re-write this Script so the event is triggered by the death of a combat target of the player, while redirecting the cast spell effect to the player?
Thanks! Please let me know if more info is necessary.