SetJohnnyOnSleepWaitEventHandler
From GECK
DumpCommandWikiDoc "SetJohnnyOnSleepWaitEventHandler"
A function added by the JohnnyGuitar NVSE Plugin version 5.11.
Description
Sets/removes the specified UDF Script as a handler that will be invoked when the player goes into the sleep/wait cycle. The event takes an integer. 0 for both rest and wait, 1 for wait, and 2 for rest.
This function can only be used in a script, not as a Condition.
Syntax
SetJohnnyOnSleepWaitEventHandler setOrRemove:Integer Script:OnSleedWaitUDF flags:Integer filter:Integer
Or:
SetONSleepWEventHandler setOrRemove:Integer Script:OnSleedWaitUDF flags:Integer filter:Integer
Example
SetJohnnyOnSleepWaitEventHandler 1 OnSleedWaitUDF 0 1
Sets the OnSleedWaitUDF script as a handler to be invoked when the player is waiting.
SetJohnnyOnFailQuestEventHandler 0 OnSleedWaitUDF 0
Removes the OnSleedWaitUDF script as a handler of the above.
Handler Script
A skeleton handler script for this event:
scn OnSleedWaitUDF int iMode begin Function {iMode} ... end
Notes
- Flag argument is reserved for future use and should always be 0.