eventOnMagicEffectApply(ObjectReferenceakTarget, ObjectReferenceakCaster, MagicEffectakEffect)
Description
Wiki Description
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.
Documentation Comment
Event received when a magic affect is being applied to the target (after registering)
Caveats
CK Wiki - Notes
- 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.
Parameters
ObjectReferenceakTarget
CK Wiki Description
TheObjectReference being hit by the effect.
ObjectReferenceakCaster
CK Wiki Description
The MagicEffect that is attempting to be applied.
MagicEffectakEffect
Examples
Event OnMagicEffectApply(ObjectReference akTarget, ObjectReference akCaster, MagicEffect akEffect)
Debug.Trace(akCaster + " applied the " + akEffect + " on " + akTarget)
EndEventAuto-Generated Example
Scriptname MyCoolScript extends ScriptObject
event OnMagicEffectApply(ObjectReference akTarget, ObjectReference akCaster, MagicEffect akEffect)
Debug.trace("Event received - OnMagicEffectApply: akTarget = " + akTarget + " akCaster = " + akCaster + " akEffect = " + akEffect)
endEvent