01 · Quick Orientation
Every State node has two halves:
State Node
- Lives on the canvas.
- Holds the value (ON/OFF, count, timestamps).
- Runs for every message that enters the node.
State Action
- Placed downstream.
- Changes the stored value (set ON, add +1, reset, etc.).
- Can live anywhere in the flow—just pick the matching node name.
02 · On/Off Switch (Gate)
The switch is a boolean guard. When ON, messages pass through; when OFF, the flow halts at this node.
Best for
- Cooldowns for chat commands.
- Manual toggles (enable/disable overlays).
- Maintenance windows (pause features during BRB scenes).
Key Actions
Set Gate State— flip ON or OFF.Reset State Node— revert to default (usually ON).
Example: 15s Cooldown
Build Steps
- Drop the switch node, name it “helloCooldown”, default ON.
- Connect your trigger → switch → actions.
- After your action, add Set Gate State (OFF) referencing “helloCooldown”.
- Add a Delay node (15 seconds).
- Add another Set Gate State (ON) for “helloCooldown”.
03 · Counter
Counters track numbers across messages. They increment automatically when a message flows through, and you can adjust values manually with actions.
Use Cases
- Every Nth chatter triggers a prize.
- Track progress to a community goal.
- Store points redeemed via commands.
Actions
Increment Counter— add or subtract custom amounts.Set Counter Value— jump to a specific number.Reset State Node— revert to the default start value.
Example: Celebrate Every 5 Messages
Inside the Condition node, compare state.hype5.value or simply use the built-in “Trigger when value matches Target” option from the Counter node’s properties.
04 · Rate Limiter (Throttle)
The throttle remembers timestamps and refuses new events until the rate you specify is respected.
Great When You Need
- “Only five raffle entries per minute.”
- “One API call per 10 seconds.”
- “Drop alerts if the overlay is already busy.”
Configuration
- Set the maximum events allowed.
- Choose the time window (seconds).
- Decide whether to queue or discard overflow.
Reset State Node if you need a clean slate during testing.
05 · Problem Kits
Pick a scenario and follow the steps.
Command Cooldown
- Switch node named “commandCooldown”.
- Trigger → switch → reply.
- Set Gate OFF → Delay → Set Gate ON.
- Add a chat message “Cooldown active” on the false output if desired.
Limited Freebies
- Counter default 0, target 3.
- Increment after each redemption.
- When value ≥ 3, branch to “Sorry, all gone”.
- Use Reset action at the end of stream.
Viewer Toggle
- Switch named “overlayToggle”.
!overlay oncommand → Set Gate ON.!overlay offcommand → Set Gate OFF.- All overlay triggers pass through the switch.
Example Flow Charts
06 · Troubleshooting & FAQ
| Symptom | Likely Cause | Fix |
|---|---|---|
| Set Gate State action won’t save. | No matching switch node exists (or the names differ). | Add the switch node first and confirm the dropdown references it. |
| Counter never increments. | The flow bypasses the counter node or the gate is false. | Make sure the trigger wire passes through the counter and the gate output is true. |
| Throttle blocks everything forever. | Window too strict or leftover state from testing. | Relax the limit and drop a Reset State Node action before retesting. |
| Guide buttons don’t open. | Running inside the extension without web_accessible resources updated. | Ensure actions/state-nodes-guide.html ships via manifest and reload the extension. |
Testing Checklist
- Use the Event Flow “Send Test Event” tool to simulate commands.
- Temporarily shorten cooldowns (2 seconds) or lower counter targets while verifying.
- Reset state nodes between tests so you are not reading stale data.
- Label branches (e.g., “false → cooldown active”) so you can follow the path visually.
07 · Next Steps
Combine state nodes with the rest of the Event Flow toolkit:
- Use logic gates (AND/OR/NOT) before a switch to decide who can toggle it.
- Store state-driven metadata under
metaso overlays know why a branch fired. - Export working patterns as templates so your team can re-import them later.