Skip to reading
Action Lists & Events

35. Build one dependable puzzle operation

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 PDF page

A finished interaction should have a clear entrance, a condition, a state change, feedback and an exit. Use this checklist to turn the simple key-and-door lesson into a reliable game sequence.

Source table from 35. Build one dependable puzzle operation, page 40
OperationRecommended order
Take keyCheck key_taken. If false, set it true, give the item, update score, hide/disable the pickup, then present feedback.
Use leverCheck or set powered explicitly. Update any dependent description/effect. Play feedback. Do not toggle accidentally on repeated calls.
Use door without keyGive a useful locked response. Leave the room and inventory unchanged.
Use door with keyApply any permanent unlock flag. Consume the key only if intended. Change to the destination spawn.
Return to roomRead saved flags and restore the matching presentation. Do not reset puzzle facts.
Load saveUse restored state. Refresh custom presentation through the successful-load path if needed.

When the player can reach the same operation by mouse, parser, controller or GUI, share the operation. The input routes can be different; the actual rule that decides whether the door opens should be the same.

If a reward depends on several actions succeeding, write that dependency explicitly in a script. The ordinary list runner does not inspect an action's returned error and automatically roll the earlier changes back.

Page 40 of 189Permalink
Go to page