RegisterForExternalEvent - ScriptObject
Revision as of 03:06, 25 June 2019 by imported>Qazaaq (added example)
This article has been flagged as incomplete. |
Please help improve the wiki by learning how to contribute. |
F4SE Member of: ScriptObject Script
Requires F4SE version 0.3.1 or higher.
Callback is the function name that is called when the event is triggered.
Syntax[edit | edit source]
Function RegisterForExternalEvent(string eventName, string callback) Native
Parameters[edit | edit source]
- 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[edit | edit source]
- None
Examples[edit | edit source]
Scriptname ChildType extends BaseType
; The name of an external event.
string MyModResetEvent = "MyModResetEvent" const
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.}