OnAnimationEventUnregistered - ScriptObject

From Creation Kit
Jump to: navigation, search

Member of: ScriptObject

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.

This event will only be sent to the specific script that registered for it. Other scripts attached to the same form/alias/active magic effect will not receive the event unless they also register.

Syntax

Event OnAnimationEventUnregistered(ObjectReference akSource, string asEventName)

Parameters

  • akSource: The ObjectReference whose animation graph unloaded.
  • asEventName: The event that can no longer be received.

Example

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

Notes

  • Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.

See Also