Mod:Creation Kit/RegisterForExternalEvent - ScriptObject

F4SE Member of: Mod:Creation Kit/ScriptObject Script

Callback is the function name that is called when the event is triggered.

Syntax
Function RegisterForExternalEvent(string eventName, string callback) Native

Parameters

 * eventName: The name of the event that you want to register for.
 * callback: The function name that is called when the event is triggered.

Return Value

 * None

Examples
Scriptname ChildType extends BaseType

string MyModResetEvent = "MyModResetEvent" const
 * The name of an external event.

Event OnQuestInit RegisterForExternalEvent(MyModResetEvent, "OnMyModReset") EndEvent

Event OnMyModReset Debug.TraceSelf(self, "OnMyModReset", "We have the external event handled.") EndEvent

ScriptName BaseType extends Quest Native Const Hidden

Event OnMyModReset Native {New event declaration. Overrride in extending scripts.}