26. Connect all three to the puzzle
Build the adventure interaction first, then update the displays from that result. The widgets should describe what happened; their visibility should not decide whether the puzzle was solved.
| Player action | Update the game |
|---|---|
| Learn about the broken machine | Start restore_workshop. Reveal machine hint 1 if the first hint should be available now. |
| Look at the dial | Complete inspect_dial only while it is active. |
| Take the brass gear | Give the item and complete find_gear at the intended point. |
| Use the gear on the mechanism | Check the item and current objective, change the machine, then complete repair_machine. |
| Wind or test the repaired machine | Change power and complete test_machine when the test succeeds. |
| Ask for help | Run UnlockHint or next_hint; do not alter the quest merely for opening hints. |
You can place shared actions directly in an action list or connect their visual-script nodes in sequence. For a small first test, On Interact → Start Quest → Complete Objective → Unlock Hint makes the connection visible. Add the state guard before using that interaction repeatedly in a finished game.
Figure 28. The same quest and hint actions are available as visual nodes. The repeated-interaction guard is still your game logic.
Quest completion does not automatically set power to 100. Hint unlocking does not complete an objective. Add every intended state change explicitly to the successful interaction.
