Mod:Creation Kit/GetBaseObject - ActiveMagicEffect

Member of: Mod:Creation Kit/ActiveMagicEffect Script

Obtains the MagicEffect this active magic effect is based on.

Syntax
MagicEffect Function GetBaseObject

Parameters
None

Return Value
The MagicEffect this active effect is based on.

Examples
MagicEffect lightEffect = ActiveLightEffect.GetBaseObject
 * Obtain the magic effect the active effect is based on

Caveat
It is possible, that the ActiveMagicEffect ceases to exist immediately (ex: if the actor it's applied to dies the moment the effect starts), so that GetBaseObject ends up being called on a none object, even in the OnEffectStart event. If you need to know the MagicEffect such a ActiveMagicEffect is attached to, you'll need to store it as a property on the ActiveMagicEffect script.