SetCurrentStageID - Quest

Revision as of 14:53, 11 November 2011 by imported>Cdcooley (Reverted edits by Scornett-Bot (talk) to last revision by Jlundin)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Quest Script

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.

Syntax

bool Function SetCurrentStageID(int iStage) native
bool Function SetStage(int iStage)

Parameters

  • iStage: The stage number to set.

Return Value

True, if the stage is successfully set, false if it is not.

Examples

; Sets the main quest to stage 20
MainQuestProperty.SetCurrentStageID(20)


; Sets the side quest stage to 10 - and logs a message if it succeeds
if (SideQuestProperty.SetStage(20))
  Debug.Trace("Side quest successfully set to stage 20!")
endIf

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.

See Also