SetOnQuestStageEventHandler

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Sets/removes the specified UDF Script as a handler that will be invoked in the event "SetStage quest stageIdx" is called from any script.

The skipScript argument is optional, and if non-zero will effectively prevent the result script (if any) of the specified stage from being executed.

When invoked, the script is passed with two arguments: the Quest and the Stage index.

Syntax

[help]
(success:0/1) SetOnQuestStageEventHandler handlerScript:ref setORremove:1/0 quest:ref stageIdx:int skipScript:1/0

Example

SetOnQuestStageEventHandler OnQuestStageUDF 1 vDialogueEDE 10 1

Sets the OnQuestStageUDF script as a handler to be invoked when "SetStage vDialogueEDE 10" is called. The result script of the stage will not be executed.

SetOnQuestStageEventHandler OnQuestStageUDF 0 vDialogueEDE 10

Removes the OnQuestStageUDF script as a handler of the above.

Handler Script

A skeleton handler script for this event:

scn	OnQuestStageUDF

ref	rQuest
int	iStageIdx

begin Function {rQuest, iStageIdx}

(code)

end

See Also