IsStageDone - Quest

Revision as of 17:22, 8 September 2023 by Candoran2 (talk | contribs) (Added notes about when a stage is considered done.)

Member of: Quest Script

Obtains whether the specified stage is done or not.

Syntax

bool Function IsStageDone(int aiStage) native
bool Function GetStageDone(int aiStage)
  return IsStageDone(aiStage)
EndFunction

Parameters

  • aiStage: The stage to check.

Return Value

Whether the passed-in stage is done or not.

Examples

; is stage 20 done in the main quest?
bool mainQuestStage20Done = MainQuestProperty.IsStageDone(20)


; Prints a debug message if the side quest has completed stage 10
if (SideQuestProperty.GetStageDone(10))
  Debug.Trace("The side quest has finished stage 10!")
endIf

Notes

A stage is considered "Done" when the quest has been set to that stage at some point in the past. This includes the current stage. This means if a quest has stage 0, 10, 20, 30, 40, 50, 60, and you do a setstage for stages 0, 40, 20, 60, then only those stages are considered done. Even though GetCurrentStageID() will return 60, GetStageDone(50) will return false.

See Also