Skip to reading
Text & Sierra-Style Adventures

14. Native two-object commands

Edition 0.86.3.4

Build a complete text or graphical parser adventure with typed commands, inventory puzzles and press-to-walk controls.

Download PDFView illustrations

USE KEY ON DOOR contains two nouns and a separator. PCA can handle a configured preposition, but the verb and its source item must both be set up for it.

1. In the Verb Designer, select Use. Enable Allow Preposition and set Preposition to on.

2. Open the source item or object. In its Verb Actions, enable the preposition form for Use.

3. Add a pair rule whose target is the cabin door, then add the actions for that pair.

4. Give the inventory key the alias pocket key to distinguish it from the room key model.

5. Take the key first, then test USE POCKET KEY ON DOOR. Also test the command before taking it.

Figure 8. A preposition is configured on the verb; the source record also opts into using it.

The typed pair must name complete nouns on both sides of ON. The runtime also checks that the source is usable and the target exists as an interactive object. A matching rule can then unlock the door, play a sound and update a variable.

The full controller uses its own explicit USE … ON … rule. You do not need both implementations active. Learn the native route here; use the controller route for the complete printed game below.

Page 17 of 68Permalink
Go to page