Background for Skyrim SE
Member of the Form script
eventOnAnimationEventUnregistered(ObjectReferenceakSource, stringasEventName)

Description

Wiki Description

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.

Documentation Comment

Event sent when you have been unregistered from receiving an animation event because the target
object's animation graph has been unloaded


Caveats

CK Wiki - Notes

  • Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
  • This event is not relayed to any aliases or magic effects attached to the form.

Parameters

  1. ObjectReferenceakSource

    CK Wiki Description

    The ObjectReference whose animation graph unloaded.

  2. stringasEventName

    CK Wiki Description

    The event that can no longer be received.


Examples

Function SomeFunction()
  RegisterForAnimationEvent(JoeBob, "IdleFurnitureExit") ; Before we can use OnAnimationEvent we must register.
EndFunction

Event OnAnimationEventUnregistered(ObjectReference akSource, string asEventName)
    if (akSource == JoeBob) && (asEventName == "IdleFurnitureExit")
        Debug.Trace("We got unregistered for JoeBob's funiture exit event, do any necessary cleanup here")
    endIf
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends Form

event OnAnimationEventUnregistered(ObjectReference akSource, string asEventName)
    Debug.trace("Event received - OnAnimationEventUnregistered: akSource = " + akSource + " asEventName = " + asEventName)
endEvent

Related Pages


Additional References

View this event’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.