Open, close and map the inventory
The GUI must be reachable during gameplay. A Button called Inventory can run an action list that hides the HUD if needed and shows inventory_lab. Its Close Button does the reverse.
| Button | Click actions, in order |
|---|---|
| Inventory on the HUD | Hide GUI: your HUD, if it would overlap. Show GUI: inventory_lab. |
| Close inside the inventory | Hide GUI: inventory_lab. Show GUI: your HUD. |
In Global Settings, go to the custom system interface assignments near the bottom of General. Set Inventory Screen to Player Inventory(inventory_lab). Apply Changes, then Save Project. This assignment lets the inventory system recognize your custom inventory window.
Figure 3. Inventory Screen, Save Screen and Load Screen point to authored GUIs. Their IDs connect the game systems to your menus.
Mapping matters for a modal inventory. A modal window blocks ordinary world input. The inventory system makes an exception for the GUI assigned as Inventory Screen; another modal GUI can prevent ordinary item selection. Test the window after you map it.
Use modal behavior for a full inventory screen when you want to block clicks into the room. Use a non-modal strip for a bag that remains part of the HUD. Avoid leaving HUD buttons over the inventory’s own controls.
