Skip to content

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.

QueryWhat it returns
Gate('X').IsOpen1 if the gate is open, 0 if closed.
Signal('X').Active1 if the signal is currently on, 0 if off.
Inventory('X').Qty('Item')The quantity of a named item at an inventory location.

Let an entity move on only while a signal is on:

WAIT UNTIL Signal('Go').Active

Trigger a reorder when stock runs low:

IF Inventory('Store').Qty('Widget') < 20 THEN SET a_Reorder TO 1 ENDIF