9. Give the key to the player
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.
| Step | Action | Fields |
|---|---|---|
| 1 | Give Inventory | Character: Player; Item: key; Quantity: 1. |
| 2 | Change Variable | key_taken; Set; true. |
| 3 | Change Variable | score; Add; 5. |
| 4 | Set Object Visible | Scene 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.
