13. Make the Review Button work
Create a GDScript record named Review Clue with ID review_clue. Keep the script base line, replace the run function with this version, then Apply Changes. Create a String variable clue_feedback for the response text.
extends "res://scripts/runtime/script_base.gd"func run(_context: Dictionary = {}) -> Variant:
var chosen: String = str(
Runtime.variables.get("selected_clue", "")
)
var response: String = "Choose a clue first."
match chosen:
"letter":
response = "The keeper expected a visitor."
"receipt":
response = "The receipt lists a clock spring."
"":
pass
_:
response = "You examine the clue: " + chosen
await SetVariable({
"name": "clue_feedback", "value": response
})
return true1. Add a Button on Clues Page with the caption Review clue.
2. In Events, set Click to run-visual-script and enter review_clue in Click Target. Despite its name, this behavior can run the GDScript record used here.
3. Add a separate Label whose Text is $$clue_feedback. Give it enough width and height for the response.
4. Run the game, select letter and press Review clue. Then repeat with receipt and with nothing selected.
Selecting a row does not automatically run this script. The separate button makes the order clear: choose first, confirm second.
