SetJohnnyOnChallengeCompleteEventHandler
From GECK
A function added by the JohnnyGuitar NVSE Plugin.
Description
Sets/removes the specified UDF Script as a handler that will be invoked when a specified Challenge (or any Challenge) is completed. Formlists are also accepted as filters. When invoked, the script is passed with a single argument: a Challenge that was completed.
Syntax
SetJohnnyOnChallengeCompleteEventHandler setORremove:1/0 handlerScript:ref flag:int challenge:filter
Or:
SetOnChallengeCompleteEventHandler setORremove:1/0 handlerScript:ref flag:int challenge:filter
Example
SetJohnnyOnChallengeCompleteEventHandler 1 OnChallengeCompleteUDF 0 rChallenge
Sets the OnChallengeCompleteUDF script as a handler to be invoked when rChallenge is started.
SetJohnnyOnChallengeCompleteEventHandler 0 OnChallengeCompleteUDF 0 rChallenge
Removes the OnChallengeCompleteUDF script as a handler of the above.
Handler Script
A skeleton handler script for this event:
scn OnChallengeCompleteUDF ref rChallenge begin Function {rChallenge} ... end
Notes
- Flag argument is reserved for future use and should always be 0.