Skip to reading
GDScript Programming & Godot

FailObjective()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Quest: Fail Objective

Mark an objective as failed, optionally selecting its stage first.

Source table from FailObjective(), page 212
Option key / fieldMeaning and inputDefault
Quest questIdChoose a Quest Designer ID.Blank
Stage stageIdChoose a stage in that quest.Blank
Objective objectiveIdChoose an objective in that stage.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await FailObjective({"questId": "", "stageId": "", "objectiveId": ""})

In use. Fail a timed optional objective when its timer expires. Keep failure consequences in a separate clear branch so a failed side objective does not accidentally end the whole quest.

ResetObjective()#

Quest: Reset Objective

Reset one objective to its unfinished state, optionally selecting its stage first.

Source table from FailObjective(), page 212
Option key / fieldMeaning and inputDefault
Quest questIdChoose a Quest Designer ID.Blank
Stage stageIdChoose a stage in that quest.Blank
Objective objectiveIdChoose an objective in that stage.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await ResetObjective({"questId": "", "stageId": "", "objectiveId": ""})

In use. Reset a repeatable practice task. It does not automatically restore consumed items, move characters or undo the rest of the room state.

Page 212 of 378Permalink
Go to page