Update the data during play
Change the source variable through Set Variable or a script action so the GUI receives a state update. The following is a complete small GDScript example:
extends "res://scripts/runtime/script_base.gd"func run(_context: Dictionary = {}) -> Variant:
var rows: Array = [
{"id": "bell", "text": "The bell rang twice"},
{"id": "floor", "text": "Fresh marks on the floor"}
]
await SetVariable({
"name": "clue_rows", "value": rows
})
return trueFigure 29. The live Array list now shows the changed bell sentence and the new floor row.
A selected row can remain selected when its ID is still present. In the test, bell stayed selected after its text changed. Removing bell from the source cleared that list’s selected ID.
For a growing journal, read the current Array, make a copy, append a new object with a stable ID, then pass the whole updated Array to Set Variable. Avoid directly changing a nested runtime value and assuming the GUI was notified.
Leave list-item actions out of a source-driven list unless you deliberately want a local copy. The next chapters explain why that distinction matters.
