SetJohnnyOnSleepWaitEventHandler

From GECK
Jump to: navigation, search


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

[help]
SetJohnnyOnSleepWaitEventHandler setOrRemove:Integer Script:OnSleepWaitUDF flags:Integer filter:Integer 

Or:

SetONSleepWEventHandler setOrRemove:Integer Script:OnSleepWaitUDF flags:Integer filter:Integer

Example

SetJohnnyOnSleepWaitEventHandler 1 OnSleepWaitUDF 0 1

Sets the OnSleepWaitUDF script as a handler to be invoked when the player is waiting.

SetJohnnyOnSleepWaitEventHandler 0 OnSleepWaitUDF 0

Removes the OnSleepWaitUDF script as a handler of the above.

Handler Script

A skeleton handler script for this event:

scn OnSleepWaitUDF

int iMode

begin Function {iMode} 

...

end

Notes

  • Flag argument is reserved for future use and should always be 0.