Save and restore the note explicitly
Create a GDScript record called save_note. Connect the Save note button to it with the same run-visual-script event setup as Save Name.
extends "res://scripts/runtime/script_base.gd"func run(_context: Dictionary = {}) -> Variant:
var note: String = str(GetGUIElementProperty(
"text_examples", "notes_box", "text", ""
))
await SetVariable({"name": "notes_saved", "value": note})
return trueCreate a second GDScript record called restore_note and connect Restore note to it.
extends "res://scripts/runtime/script_base.gd"func run(_context: Dictionary = {}) -> Variant:
var note: String = str(Runtime.variables.get("notes_saved", ""))
SetGUIElementProperty(
"text_examples", "notes_box", "value", note
)
return trueFigure 25. The restored multiline text contains both saved lines. The script reads live text and writes the text-box value when refilling it.
A label containing Saved: $$notes_saved can show the stored note separately. Saving this variable is not the same as writing a text file. Game saves can preserve runtime variables; the draft control still needs an intentional restore step when your UI is rebuilt or reopened after loading.
