Skip to reading
Replace the Built-in Screens

Call the notebook helper from a normal event

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

Record ID: remember_door. Global Script: off. Put this on the north door’s discovery action, or call it from an action list or a visual script.

Code example
extends "res://scripts/runtime/script_base.gd"
Code example
func run(_context: Dictionary = {}) -> Variant:
    await CallScript("journal_tools", "add_entry", [
        "north_door", "The locked north door",
        "The brass key fits the lock. I should ask Mara about the clock."])
    return true

To teach Mara this fact directly, add "assistant" as the fourth item in the argument array, after the body string. To teach both characters, call add_entry once for each intended owner.

Source table from Call the notebook helper from a normal event, page 81
ParameterWhat to keep straight
entry_idStable ID of the fact, such as north_door.
titleShort readable list caption.
bodyThe longer passage in the reader.
character_idOptional owner; blank means the current active player.

For a Functions as Nodes workflow, expose add_entry with these parameters using your function definitions. The saved array format and ownership rule remain the same.

Page 81 of 88Permalink
Go to page