The ActiveMagicEffect script is a part of Skyrim SE’s Papyrus scripting ecosystem. It is included with the base game, and is extended/modified by modded sources such as Skyrim Script Extender x64 (SKSE).
For this script, the Papyrus index knows about:
- 73 events
- 49 functions
Inheritance Tree
No indexed scripts extend this script.
Properties
No properties found.
Events
- eventOnAnimationEvent(ObjectReferenceakSource, stringasEventName)
Event called when the active magic effect/alias/form receives one of the animation events it was listening for.
- eventOnAnimationEventUnregistered(ObjectReferenceakSource, stringasEventName)
Received when one of the animation events we are listening for has been automatically unregistered by the game due to the target animation graph unloading. This event is not received when you manually unregister for the event.
- eventOnEffectStart(ActorakTarget, ActorakCaster)
Event called when the active magic effect has just started on the specified target.
- eventOnEffectFinish(ActorakTarget, ActorakCaster)
Event called when the active magic effect has just finished on the specified target.
- eventOnGainLOS(ActorakViewer, ObjectReferenceakTarget)
Event called when a viewer goes from not seeing the target, to seeing the target - if this active magic effect/alias/form is registered for it.
- eventOnLostLOS(ActorakViewer, ObjectReferenceakTarget)
Event called when a viewer goes from seeing the target, to not seeing the target - if this active magic effect/alias/form is registered for it.
- eventOnSleepStart(floatafSleepStartTime, floatafDesiredSleepEndTime)
Received when the player sleeps. Start and desired end time are in game time days (after registering)
- eventOnSleepStop(boolabInterrupted)
Received when the player stops sleeping - whether naturally or interrupted (after registering)
- eventOnTrackedStatsEvent(stringarStatName, intaiStatValue)
Event received when a tracked stat is updated for the player
- eventOnUpdateGameTime()
Update event, sent every X hours of game time while this magic effect is registered for them
- eventOnActivate(ObjectReferenceakActionRef)
Event received when this reference is activated
- eventOnAttachedToCell()
Event received when this object has moved to an attached cell from a detached one
- eventOnCellAttach()
Event received when this object's parent cell is attached
- eventOnCellDetach()
Event received when this object's parent cell is detached
- eventOnCellLoad()
Event received when every object in this object's parent cell is loaded (TODO: Find restrictions)
- eventOnClose(ObjectReferenceakActionRef)
Event received when this object is closed
- eventOnContainerChanged(ObjectReferenceakNewContainer, ObjectReferenceakOldContainer)
Event received when this object enters, exits, or changes containers
- eventOnDestructionStageChanged(intaiOldStage, intaiCurrentStage)
Event received when this reference's destruction stage has changed
- eventOnDetachedFromCell()
Event recieved when this object moves to a detached cell from an attached one
- eventOnEquipped(ActorakActor)
Event received when this object is equipped by an actor
- eventOnHit(ObjectReferenceakAggressor, FormakSource, ProjectileakProjectile, boolabPowerAttack, boolabSneakAttack, boolabBashAttack, boolabHitBlocked)
Event received when this object is hit by a source (weapon, spell, explosion) or projectile attack
- eventOnItemAdded(FormakBaseItem, intaiItemCount, ObjectReferenceakItemReference, ObjectReferenceakSourceContainer)
Event received when an item is added to this object's inventory. If the item is a persistant reference, akItemReference will
point at it - otherwise the parameter will be None - eventOnItemRemoved(FormakBaseItem, intaiItemCount, ObjectReferenceakItemReference, ObjectReferenceakDestContainer)
Event received when an item is removed from this object's inventory. If the item is a persistant reference, akItemReference
will point at it - otherwise the parameter will be None - eventOnLockStateChanged()
Event received when the lock on this object changes
- eventOnMagicEffectApply(ObjectReferenceakCaster, MagicEffectakEffect)
Event received when a magic affect is being applied to this object
- eventOnOpen(ObjectReferenceakActionRef)
Event received when this object is opened
- eventOnRaceSwitchComplete()
Event received when this actor finishes changing its race
- eventOnSpellCast(FormakSpell)
Event received when a spell is cast by this object
- eventOnTranslationComplete()
Event received when translation is complete (from a call to TranslateTo)
- eventOnTranslationFailed()
Event received when translation is aborted (from a call to StopTranslateTo)
- eventOnTrapHit(ObjectReferenceakTarget, floatafXVel, floatafYVel, floatafZVel, floatafXPos, floatafYPos, floatafZPos, intaeMaterial, boolabInitialHit, intaeMotionType)
Event recieved when this reference hits a target
- eventOnTrapHitStart(ObjectReferenceakTarget, floatafXVel, floatafYVel, floatafZVel, floatafXPos, floatafYPos, floatafZPos, intaeMaterial, boolabInitialHit, intaeMotionType)
Event recieved when this starts hitting a target
- eventOnTrapHitStop(ObjectReferenceakTarget)
Event recieved when this stops hitting a target
- eventOnTrigger(ObjectReferenceakActionRef)
Event received when a this trigger is tripped
- eventOnTriggerEnter(ObjectReferenceakActionRef)
Event received when this trigger volume is entered
- eventOnTriggerLeave(ObjectReferenceakActionRef)
Event received when this trigger volume is left
- eventOnUnequipped(ActorakActor)
Event received when this object is unequipped by an actor
- eventOnCombatStateChanged(ActorakTarget, intaeCombatState)
Event that is triggered when this actor's combat state against the target changes
State is as follows:
0 - not in combat
1 - in combat
2 - searching - eventOnSit(ObjectReferenceakFurniture)
Event that is triggered when this actor sits in the furniture
- eventOnGetUp(ObjectReferenceakFurniture)
Event that is triggered when this actor leaves the furniture
- eventOnLocationChange(LocationakOldLoc, LocationakNewLoc)
Event that is triggered when this actor changes from one location to another
- eventOnLycanthropyStateChanged(boolabIsWerewolf)
Received when the lycanthropy state of this actor changes (when SendLycanthropyStateChanged is called)
- eventOnObjectEquipped(FormakBaseObject, ObjectReferenceakReference)
Event received when this actor equips something - akReference may be None if object is not persistent
- eventOnObjectUnequipped(FormakBaseObject, ObjectReferenceakReference)
Event received when this actor unequips something - akReference may be None if object is not persistent
- eventOnPackageStart(PackageakNewPackage)
Event received when this actor starts a new package
- eventOnPackageChange(PackageakOldPackage)
Event received when this actor's package changes
- eventOnPackageEnd(PackageakOldPackage)
Event received when this actor's package ends
- eventOnWardHit(ObjectReferenceakCaster, SpellakSpell, intaiStatus)
Event received when this object's Ward is hit by a spell
- eventOnPlayerBowShot(WeaponakWeapon, AmmoakAmmo, floatafPower, boolabSunGazing)
Received when the player fires a bow. akWeapon will be a bow, akAmmo is the ammo or None,
afPower will be 1.0 for a full-power shot, less for a dud, and abSunGazing will be true if the player is looking at the sun. - eventOnPlayerFastTravelEnd(floatafTravelGameTimeHours)
Received when the player finishes fast travel, gives the duration of game time the travel took
- eventOnPlayerLoadGame()
Received immediately after the player has loaded a save game. A good time to check for additional content.
- eventOnVampireFeed(ActorakTarget)
Received when StartVampireFeed is called on an actor
- eventOnVampirismStateChanged(boolabIsVampire)
Received when the vampirism state of this actor changes (when SendVampirismStateChanged is called)
- Found in:
- SKSE
eventOnControlDown(stringcontrol)- Found in:
- SKSE
eventOnControlUp(stringcontrol, floatholdTime)- Found in:
- SKSE
eventOnMenuOpen(stringmenuName)- Found in:
- SKSE
eventOnMenuClose(stringmenuName)- Found in:
- SKSE
eventOnPlayerCameraState(intoldState, intnewState)- Found in:
- SKSE
eventOnCrosshairRefChange(ObjectReferenceref)- Found in:
- SKSE
eventOnActorAction(intactionType, ActorakActor, Formsource, intslot)- Found in:
- SKSE
eventOnNiNodeUpdate(ObjectReferenceakActor)
Functions
Add an inventory event filter to this effect. Item added/removed events matching the
specified form (or in the specified form list) will now be let through.Obtains the MagicEffect this active magic effect is based on.
Obtains the Actor that cast the spell this effect is from.
Obtains the Actor this active magic effect is applied to.
Register for the specified animation event from the specified object - returns true if it successfully registered
Register for LOS gain and lost events between the viewer and the target
A loss or gain event will be sent immediately, depending on whether or not the viewer is already looking at the target or not
If the viewer is not the player, the target must be another actorRegister for only the first LOS gain event between the viewer and the target
If the viewer is already looking at the target, an event will be received almost immediately
If the viewer is not the player, the target must be another actorRegister for only the first LOS lost event between the viewer and the target
If the viewer is already not looking at the target, an event will be received almost immediately
If the viewer is not the player, the target must be another actorRegister for a single OnUpdate event, in afInterval seconds. All scripts attached to this magic effect will get the update events
Of course, this means you don't need to call UnregisterForUpdate()
If you find yourself doing this:
Event OnUpdate()
UnregisterForUpdate()
{Do some stuff}
endEvent
Then you should use RegisterForSingleUpdate insteadRegisters this magic effect to receive events when the player sleeps and wakes up
Registers this alias to receive events when tracked stats are updated
Register for OnUpdate events, every X seconds, where X is the interval. All scripts attached to this magic effect will get the update events
Register for OnUpdateGameTime events, every X hours of game time, where X is the interval. All scripts attached to this magic effect will get the update events
Register for a single OnUpdateGameTime event, in afInterval hours of game time. All scripts attached to this magic effect will get the update events
Remove all inventory event filters from this effect - all item added/removed events will now be received
Remove an inventory event filter from this effect. Item added/removed events matching the
specified form (or in the specified form list) will no longer be let through.Turns on profiling for this specific object and all scripts attached to it - setting doesn't persist across saves
Will do nothing on release console builds, and if the Papyrus:bEnableProfiling ini setting is offTurns off profiling for this specific object and all scripts attached to it - setting doesn't persist across saves
Will do nothing on release console builds, and if the Papyrus:bEnableProfiling ini setting is offUnregister for any LOS events between the viewer and target
Unregister for the specified animation event from the specified object
Unregisters this magic effect to receive events when the player sleeps and wakes up
Unregisters this magic effect from receiving events when tracked stats are updated
Unregister for OnUpdate events, all attached scripts will stop getting update events
Unregister for OnUpdateGameTime events, all attached scripts will stop getting update game time events
- Found in:
- SKSE
Returns the Duration of the Active Magic Effect.
- Found in:
- SKSE
Returns the Elapsed time of the Active Magic Effect.
- Found in:
- SKSE
Registers for OnKeyDown and OnKeyUp events for the given keycode.
- Found in:
- SKSE
- Found in:
- SKSE
- Found in:
- SKSE
Registers for OnControlDown and OnControlUp events for the given control.
For a list of valid controls, see Input.psc.- Found in:
- SKSE
- Found in:
- SKSE
- Found in:
- SKSE
Registers for OnMenuOpen and OnMenuClose events for the given menu.
Registrations have to be refreshed after each game load.
For a list of valid menu names, see UI.psc.- Found in:
- SKSE
- Found in:
- SKSE
- Found in:
- SKSE
Registers a custom event callback for given event name.
Registrations have to be refreshed after each game load.Examples:
RegisterForModEvent("myCustomEvent", "MyModEventCallback")Event signature of custom event callbacks:
Event MyModEventCallback(string eventName, string strArg, float numArg, Form sender)
endEvent- Found in:
- SKSE
- Found in:
- SKSE
- Found in:
- SKSE
Sends custom event with given generic parameters.
- Found in:
- SKSE
See Form.psc
- Found in:
- SKSE
- Found in:
- SKSE
See Form.psc
- Found in:
- SKSE
- Found in:
- SKSE
See Form.psc
- Found in:
- SKSE
- Found in:
- SKSE
Registers the script for when a QueueNiNodeUpdate is called
- Found in:
- SKSE
- Found in:
- SKSE
Returns the Magnitude of the Active Magic Effect.
