Skip to reading
GDScript Programming & Godot

UnlockHint()

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

Unlock Hint Topic / Answer

Unlock a numbered answer within an existing hint topic.

Source table from UnlockHint(), page 92
Option key / fieldMeaning and inputDefault
Topic ID topicIdText.Blank
Answer Number answerNumberWhole number.1

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

Code example
await UnlockHint({"topicId": "", "answerNumber": 1})

In use. Unlock answer 2 for the archive topic after the player has examined the door. Match the topic ID and answer numbering used by the hint system; an invented ID does not create a complete hint topic.

RunVisualScript()#

Run Visual Script

Run a selected script and wait for that call. Despite its label, the picker can select the supported text-script languages as well as visual graphs.

Source table from UnlockHint(), page 92
Option key / fieldMeaning and inputDefault
Script scriptIdChoose a visual or supported text script.Blank

Timing. Waits for the selected script call.

Code example
await RunVisualScript({"scriptId": "utility_gd"})

In use. Put the door's inventory check in open_door, then call that script from the door's Use response. Keep the conditional logic in that one place instead of copying it into several event lists.

Page 92 of 378Permalink
Go to page