OnEffectFinish - ActiveMagicEffect

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ActiveMagicEffect Script

Event called when the active magic effect has just finished on the specified target.

Syntax[edit | edit source]

Event OnEffectFinish(Actor akTarget, Actor akCaster)

Parameters[edit | edit source]

  • akTarget: The Actor this effect just finished on.
  • akCaster: The Actor that cast the spell this effect is from.

Examples[edit | edit source]

Event OnEffectFinish(Actor akTarget, Actor akCaster)
  Debug.Trace("Magic effect fades from " + akTarget)
endEvent

Notes[edit | edit source]

  • 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.

See Also[edit | edit source]