8. Events, verbs and inventory rules
8. Events, verbs and inventory rules
Figure 13. The carried Power cell item. Its rule targets the relay and runs when the player uses this item on that target.
Create an Inventory item definition for what can be carried. Give it a name and icon. Add Inventory puts it in the player's inventory; Remove Inventory takes it out. A physical pickup can hide itself after adding the carried item.
For a use-on puzzle, make a rule on the inventory definition, choose the target object and write the successful actions there. Enable the Use preposition when you want a phrase such as Use key on door. The verb's preposition text and the item's use-on rule do different jobs: one presents the sentence, the other implements the result.
