25. The key, notebook and locked door
On this page
25. The key, notebook and locked door
Make the three carried items#
Create archive_key, brass_wheel and bearing_oil. Their names and icons are in the table. Keep stacking off and enable the Use preposition so they can be applied to a room target.
| ID | Name | Icon |
|---|---|---|
| archive_key | Archive key | key_icon |
| brass_wheel | Brass wheel | wheel_icon |
| bearing_oil | Bearing oil | oil_icon |
The workbench drawer#
On bench, default verb Use. Its Use action checks key_taken. If true, show that the drawer is empty. Otherwise set key_taken true, Add Inventory archive_key, Add Score 10, show the discovery message and update objective to try the key on the archive door.
The exact action text and branch order are in the puzzle recipe reference. Use Add Score here: Clockmaker awards separate rewards. The guard prevents the same drawer reward from accumulating.
The repair notebook#
On notebook, Use sets read_note true and shows the repair instructions. Include all three facts: replace the missing brass wheel, oil the bearing and wind III - I - II. Let the player reread the notebook. A clue does not need to disappear after the first look.
The archive door#
On archive_door, Use checks archive_open. If true, change to archive at entry. Otherwise show the locked-door message. Do not make a plain Use click unlock it without the key.
Open the Inventory definition archive_key. Add a target rule for entity:archive_door. If archive_open is true, change to archive. Otherwise set archive_open true, Add Score 10, show the lock-turning message and change to archive.
The supplied demo keeps the key after unlocking. Do not add Remove Inventory archive_key if you want to match it exactly. In your own game, consuming or keeping a key is a design choice; in a reconstruction, follow the intended behavior.
archive_key > archive_key_on_archive_door#
Targets: entity:archive_door
1. If Variable - name = archive_open; equals = true
