GetMagnitude - ActiveMagicEffect

Revision as of 07:21, 7 October 2023 by Ingvion (talk | contribs) (Note)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SKSE Member of: ActiveMagicEffect Script

Returns the Magnitude of the Active Magic Effect.

SyntaxEdit

float Function GetMagnitude() native

Return ValueEdit

Returns the Magnitude of the Magic Effect.

It will compile but will not execute if the effect has no duration.

ExamplesEdit

;Used self variable. Self was the script attached to this magic effect. 

Float Magnitude = self.GetMagnitude()
Debug.Trace("This magic effect has a strength value of" +Magnitude)

NotesEdit

Scripts sometimes unable to call this function, if the effect dispels in the same second it is casted - e.g. effects with no duration, or quickly casting/releasing a concentration type spell, that call this function from the OnEffectStart event. To prevent this, it's better to call GetMagnitude() before OnEffectStart - with OnInit event; in this case this function appear to be fail-safe.

See AlsoEdit