GetBaseObject - ActiveMagicEffect

From the Fallout4 CreationKit Wiki
Revision as of 16:38, 27 April 2015 by imported>Valie (→‎Caveat)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: ActiveMagicEffect Script

Obtains the MagicEffect this active magic effect is based on.

Syntax[edit | edit source]

MagicEffect Function GetBaseObject()

Parameters[edit | edit source]

None

Return Value[edit | edit source]

The MagicEffect this active effect is based on.

Examples[edit | edit source]

; Obtain the magic effect the active effect is based on
MagicEffect lightEffect = ActiveLightEffect.GetBaseObject()

Caveat[edit | edit source]

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.

See Also[edit | edit source]