- Found in:
- Vanilla
eventOnEffectFinish(ObjectReferenceakTarget, ActorakCaster, MagicEffectakBaseEffect, floatafMagnitude, floatafDuration)
Description
Wiki Description
Event called when the active magic effect has just finished on the specified target.
Documentation Comment
Event received when this effect is finished (effect may already be deleted, calling
functions on this effect will fail)
Caveats
CK Wiki - Notes
- By the time this event is called, the active magic effect may have already been deleted by the game. Any native calls to this active magic effect may fail.
- Also, since the game forcibly deletes ActiveMagicEffects, if the script has a circular reference to itself (via a local variable - either directly or via a struct/array) that circular reference will be forcibly cleared by the Papyrus garbage collector, resulting in the value receiving a None value.
Parameters
ObjectReferenceakTarget
CK Wiki Description
The Actor this effect just finished on.
ActorakCaster
CK Wiki Description
The Actor that cast the spell this effect is from.
MagicEffectakBaseEffect
floatafMagnitude
floatafDuration
Examples
Event OnEffectFinish(Actor akTarget, Actor akCaster)
Debug.Trace("Magic effect fades from " + akTarget)
endEventAuto-Generated Example
Scriptname MyCoolScript extends ActiveMagicEffect
event OnEffectFinish(ObjectReference akTarget, Actor akCaster, MagicEffect akBaseEffect, float afMagnitude, float afDuration)
Debug.trace("Event received - OnEffectFinish: akTarget = " + akTarget + " akCaster = " + akCaster + " akBaseEffect = " + akBaseEffect + " afMagnitude = " + afMagnitude + " afDuration = " + afDuration)
endEvent