Description
Wiki Description
Attempts to set the quest's current stage. If the stage exists, and was successfully set, the function returns true. Otherwise, the function returns false and the stage is unchanged. Is latent and will wait for the quest to start if it has to start the quest. If the stage has any fragments attached to it, the function will also wait for those fragments to finish running before returning.
Documentation Comment
Alias of SetCurrentStage - Set the quest to the requested stage
This function is latent and will wait for the quest to start up before returning (if it needed to be started)
Caveats
CK Wiki - Notes
If the target stage has multiple items with fragments on them, the function will not return until all items have finished running. Also note that all the items fragments will start at the same time, and will NOT wait on the "previous" item in the list to finish running.
To set stage to a value lower than current stage you should use reset() function before setstage().
Be aware: Although you can't set the current stage number to a lower value, this function can still display the journal entry and run script fragments from lower numbered stages, if they hadn't previously been completed.
Parameters
intaiStage
CK Wiki Description
The stage number to set.
Examples
; Sets the main quest to stage 20
MainQuestProperty.SetCurrentStageID(20); Sets the side quest stage to 20 - and logs a message if it succeeds
if (SideQuestProperty.SetStage(20))
Debug.Trace("Side quest successfully set to stage 20!")
endIfAuto-Generated Example
int myInt__aiStage
bool returnedValue = myQuest__toCallFunctionOn.SetStage(myInt__aiStage)