Skip to reading
Action Lists & Events

12. Open a door only with the key

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView illustrations

Use a visual branch for the locked-door decision. A plain list containing Remove Inventory then Change Scene would change rooms even when the player had no key.

1. Create a graph named Open the Archive Door, ID open_door.

2. Connect On Interact to Has Inventory. Select Archive Key.

3. Connect False to Show Message: I need the archive key.

4. Connect True to Change Scene. Select The Archive and the from_signal spawn.

5. In the door's Use Verb response, choose Run Visual Script and select open_door.

Figure 10. The inventory condition separates a useful failure response from the successful room change.

For a reusable key, leave it in the bag. For a consumed key, put Remove Inventory on the True path before changing rooms. In either case, the possession test comes first.

Test both paths from a fresh session: first without the key, then after taking it. A successful run with a key does not prove the locked path works.

Page 16 of 189Permalink
Go to page