Background for Skyrim SE
Member of the ANDR_PapyrusFunctions script
ActiveMagicEffectfunctionGetActiveMagicEffectFromActor(ActorakActor, MagicEffectakMagicEffect)NativeGlobal

Description

Wiki Description

Gets an Active Magic Effect instance from the specified actor.

Documentation String

  • akActor: the actor to check.
  • akMagicEffect: the base magic to look for.
  • Returns: the instance (ActiveMagicEffect) of akMagicEffect on the akActor.

Caveats


Parameters

ActorakActor

CK Wiki Description

The Actor to get the ActiveMagicEffect from.

MagicEffectakMagicEffect

CK Wiki Description

The MagicEffect to get the ActiveMagicEffect (its instance) from.


Examples

;get the remaining duration of the Fortify Alteration active magic effect instance on the player.

ActiveMagicEffect RelevantAME = ANDR_PapyrusFunctions.GetActiveMagicEffectFromActor(PlayerRef, AlchFortifyAlteration)

If RelevantAME
    Float RemainingTime = (RelevantAME.GetDuration() - RelevantAME.GetElapsedTime())
    debug.notification("The player has " + RemainingTime + " seconds remaining on their fortify alchemy effect.")
EndIf

Auto-Generated Example

Actor myActor__akActor
MagicEffect myMagicEffect__akMagicEffect

ActiveMagicEffect returnedValue = ANDR_PapyrusFunctions.GetActiveMagicEffectFromActor(myActor__akActor, myMagicEffect__akMagicEffect)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.