Background for Fallout 4
Member of the ScriptObject script
voidfunctionUnregisterForCustomEvent(ScriptObjectakSender, stringasEventName)Native

Description

Wiki Description

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.

Documentation Comment

Unregister for the specified custom event from the specified object


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.


Parameters

  1. ScriptObjectakSender

    CK Wiki Description

    The ScriptObject that receives the event we no longer want to receive.

  2. stringasEventName

    CK Wiki Description

    The custom event we do not want relayed to us. This must be a raw string literal and may not be a variable.


Examples

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

Auto-Generated Example

ScriptObject myScriptObject__akSender
CustomEventName (string[]) myCustomEventName (string[])__asEventName

myScriptObject__toCallFunctionOn.UnregisterForCustomEvent(myScriptObject__akSender, myCustomEventName (string[])__asEventName)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.