OnMagicEffectApply - ScriptObject
Jump to navigation
Jump to search
Member of: ScriptObject Script
Event called when a magic effect is about to be applied to the target.
This event will only be sent to the specific script that registered for it. Other scripts attached to the same form/alias/active magic effect will not receive the event unless they also register.
Syntax[edit | edit source]
Event OnMagicEffectApply(ObjectReference akTarget, ObjectReference akCaster, MagicEffect akEffect)
Parameters[edit | edit source]
- akTarget: TheObjectReference being hit by the effect.
- akAggressor: The ObjectReference that is responsible for the spell.
- akEffect: The MagicEffect that is attempting to be applied.
Examples[edit | edit source]
Event OnMagicEffectApply(ObjectReference akTarget, ObjectReference akCaster, MagicEffect akEffect)
Debug.Trace(akCaster + " applied the " + akEffect + " on " + akTarget)
EndEvent
Notes[edit | edit source]
- Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
- This event only fires once, in order to have it fire again, you must re-register.