Rules answer "when X happens, do Y". A State Machine answers a different question: what mode is this thing in right now — closed or open, idle or playing, page 1 or page 2 — and which events move it from one mode to the next. Add one to an artboard or a group from + Add → States.
01Quick tour
- Select a group, + Add → States. A machine called States appears with one state, Idle.
- Click + State — it arrives as State 2 — and rename it Open.
- Click + Click transition: Idle → Click → Open. Add a second transition the other way.
- Press Play. Each click flips the ● indicator between Idle and Open.

02The card
The States section holds one card per machine; + State Machine adds another. Hover a control for its name — the header controls have no labels of their own.
| Control | What it does |
|---|---|
| Checkbox | Enable or disable the machine |
| Name | What the machine is called |
| Priority | When several machines start together, lower numbers start first |
| ● name | The current state — updates live in play mode |
| Initial state | Where the machine starts when play begins |
| × | Delete the machine |
States
Each state is a row: its name, + Sequence play, and ×. + State adds one.
+ Sequence play attaches an entry action — something that runs every time the machine enters this state. Entry actions use the same vocabulary as rule actions; this button adds one that plays a sequence.
Transitions
Under Transitions (event → state), a transition reads left to right: from state → Event → to state.
| Field | What it does |
|---|---|
| From | The state the machine must be in |
| Event | The same list as rule triggers, grouped Pointer / Time / Logic — see Triggers, targets & verbs |
| To | The state to enter |
| Key | For Key Down / Key Up: type the key the way you think of it — w, 1, space, up. Empty means any key |
| Signal name | For On Signal: which signal — empty means any |
| Sequence transition | The last picker (— = none). Optionally play a saved sequence transition (a crossfade, a page curl) while switching — see Timeline & animation |
| × | Delete the transition |
+ Click transition is a shortcut: it appears once you have two states and writes initial state → Click → the other state.
03How it runs
- Machines only run in play mode. Entering play resets every machine to its initial state, in Priority order, and runs those states' entry actions.
- Pointer events reach a machine through its own layer: a Click transition on a group fires when the group is clicked.
- Key Down / Up and On Signal are global — any machine anywhere in the scene can respond.
- Only the first matching transition fires. If two transitions leave the same state on the same event, the one higher in the list wins.
A machine and a rule can coexist on the same layer: the rule fires on every click, the machine only changes state when a transition matches.
04Reading the current state
- In the editor, the ● in the card header shows the current state.
- When the scene is embedded, the host page is told every time a machine changes state — the machine's name, the layer, and the new state's name. That is how a web page can react to Open / Closed without knowing anything about the layers inside.
Inside the scene itself, the way to react to a state is the state's own entry actions, or a transition whose entry action is Emit Signal — every rule listening for that signal answers.
05Shortcut recap
| Add | + Add → States · + State Machine for a second one |
| States | + State · + Sequence play adds an entry action · × deletes |
| Transitions | + Click transition · pick from / Event / to · × deletes |
| Try it | Play in the artboard's pill · watch ● in the card |