Mod:Creation Kit/UnregisterForCustomEvent - ScriptObject

Member of: Mod:Creation Kit/ScriptObject Script

Unregisters this script from receive the specified custom event from the source object whenever that source object sends the event. This will only unregister this script and not any other script attached to the same form, or alias or magic effect.

Syntax
Function UnregisterForCustomEvent(ScriptObject akEventSource, CustomEventName asEventName) native

Parameters

 * akEventSource: The ScriptObject that receives the event we no longer want to receive.
 * asEventName: The custom event we do not want relayed to us. This must be a raw string literal and may not be a variable.

Return Value
None

Examples
UnregisterForCustomEvent(kAmbushTrigger, "Ambush")
 * Stop receiving Ambush events from the ambush trigger