Gates ›
Control Flow ›
Toggle
Toggle
Flips a persistent boolean value each time an execution pulse arrives.
Diagram
Ports drawn from the source data: inputs left, outputs right, config inside.
How it's used
Flip between false and true on each pulse — a one-gate latch/switch.
- Button that turns something on, then off, then on
- Toggle a light, forcefield, or platform
Push-button light switch
let on = Toggle() // pulse its Exec from a button
// Wire 'on' into the thing you’re switching (light enabled, etc.). Documented: flips state each exec pulse.
Wire inputs
Wires you feed into the gate.
| Display name | Type | Tooltip |
|---|---|---|
| Exec | exec | No tooltip in source |
Wire outputs
Wires the gate produces.
| Display name | Type | Tooltip |
|---|---|---|
| Exec Out (ExecOut) | exec | No tooltip in source |
| Output | bool | No tooltip in source |
Configuration properties
Set on the gate itself in its properties panel — not wired. Distinct from inputs.
| Display name | Type | Tooltip |
|---|---|---|
| Value | bool | No tooltip in source |
Source details
- Brick asset
- B_1x1_Gate_Exec_Toggle
- Component class
- BrickComponentType_Exec_Toggle
- Kind
- exec
- Family
- —
- Search tags
- switch flip boolean bool on off state latch
- Half size
- 5 × 5 × 2