Skip to reading
Action Lists & Events

9. Give the key to the player

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

The key on the workbench and the key in the bag are separate records. First create the Archive Key inventory definition, with ID key and an icon. Then give the visible scene object a Take response.

Source table from 9. Give the key to the player, page 13
StepActionFields
1Give InventoryCharacter: Player; Item: key; Quantity: 1.
2Change Variablekey_taken; Set; true.
3Change Variablescore; Add; 5.
4Set Object VisibleScene object: key_pickup; Visible off.

Figure 7. Give Inventory appears in the native Take response. Choose the carried item definition, not its scene mesh.

Apply, save and test. Choose Take, click the visible key, and open Inventory. The icon should appear, the world key should disappear, and score should rise by five.

This simple sequence demonstrates the separate operations. Before treating it as a finished pickup, add the one-time guard in the next lessons. Otherwise another route could call the reward again.

Page 13 of 189Permalink
Go to page