Difference between revisions of "OnEffectFinish - ActiveMagicEffect"
OnEffectFinish - ActiveMagicEffect (edit)
Revision as of 18:51, 12 November 2018
, 18:51, 12 November 2018→Notes
imported>DavidJCobb (→Notes: merged and clarified two of the notes; added another one based on testing.) |
imported>DavidJCobb m (→Notes) |
||
Line 24: | Line 24: | ||
== Notes == | == Notes == | ||
* By the time this event is called, the underlying active magic effect may have already been deleted by the game. Attempts to call native functions may fail and throw errors. | * By the time this event is called, the underlying active magic effect may have already been deleted by the game. Attempts to call native functions may fail and throw errors. | ||
** Even if the effect is simply disabled (due to spell-side conditions not being met) rather than | ** Even if the effect is simply disabled (due to spell-side conditions not being met) rather than deleted, calls to native functions may fail, because the Papyrus script object itself is detached after OnEffectFinish completes, resetting all properties and script object variables. | ||
* This event is also called when the owning spell is removed from the target or when its conditions become invalid. | * This event is also called when the owning spell is removed from the target or when its conditions become invalid. | ||
* If a magic effect is applied to a [[LeveledCharacter]] and the actor respawns (e.g. because their parent cell has been reset) before the effect runs out, then OnEffectFinish will not run. The effect will simply cease to exist. | * If a magic effect is applied to a [[LeveledCharacter]] and the actor respawns (e.g. because their parent cell has been reset) before the effect runs out, then OnEffectFinish will not run. The effect will simply cease to exist. |