Reveal one more clue
SCRIPT DESIGNER / ONE SHORT SCRIPT
The Ask button needs to answer two questions. Which part of the pickup is unfinished? How many hints for that part has the player already seen? One short script handles both.
1. In Adventure Database › Scripts, add a regular GDScript named Next clue, ID shift_hint. Leave Keep global instance alive off. Replace the starter text with the whole block below. Indent each level with four spaces. Click Validate, then Apply Changes, and save.
func run(_context = {}): if IfVariable("pickup_done"): await ShowMessage({"text": "The last load is out. You can lock up."}) return var topic = "washer" if IfVariable("washer_fixed"): topic = "plate" if IfVariable("plate_fitted"): topic = "radio" if IfVariable("dispatch_ok"): topic = "bins" var seen = Runtime.variables.get("hintsUnlocked", {}) var count = mini(3, int(seen.get(topic, 0)) + 1) await UnlockHint({"topicId": topic, "answerNumber": count})Regular GDScript editor. Enter the block in the source pane. Validate checks the script; Apply Changes saves it to this record.
2. Read the four names inside the block. The script starts with the washer. A repaired washer leads to the plate. A fitted plate leads to the radio. A fitted plate plus Gus’s clearance leads to the bins. If the load has left, the player gets a closing line.
3. Open GUI Designer › Night shift notebook. Select Ask for one clue. Set Events › Click to run-visual-script and Click Target to shift_hint. This button action also runs a regular PCA GDScript, just as the sorter did in Part 5. Save.
Why the last three lines matter. The number passed to UnlockHint is the total to show. Asking a second time reveals answer 2 while keeping answer 1. The cap of 3 prevents a fourth click from revealing a different puzzle. PCA saves the counts in hintsUnlocked. There is no extra variable to create.
