UnregisterForRemoteEvent - ScriptObject

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ScriptObject Script

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

Syntax[edit | edit source]

Function UnregisterForRemoteEvent(ScriptObject akEventSource, ScriptEventName asEventName) native

Parameters[edit | edit source]

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

Return Value[edit | edit source]

None

Examples[edit | edit source]

; Stop receiving OnActivate events from the secret door
UnregisterForRemoteEvent(SecretDoor, "OnActivate")

Notes[edit | edit source]

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[edit | edit source]