Gate, Signal, and Inventory Queries
These queries read the state of a gate, a signal, or an inventory location. Each names its object in quotes.
| Query | What it returns |
|---|---|
Gate('X').IsOpen | 1 if the gate is open, 0 if closed. |
Signal('X').Active | 1 if the signal is currently on, 0 if off. |
Inventory('X').Qty('Item') | The quantity of a named item at an inventory location. |
Examples
Section titled “Examples”Let an entity move on only while a signal is on:
WAIT UNTIL Signal('Go').ActiveTrigger a reorder when stock runs low:
IF Inventory('Store').Qty('Widget') < 20 THEN SET a_Reorder TO 1 ENDIF
