Skip to main content

Variables

Variables store values for use across your flow, and in some cases across runs.

Flow Variables​

Scoped to a single flow and reset each time it runs. Use them for temporary values, results passed between branches and per-run counters.

  1. Define variables in the flow's variable panel.
  2. Read them with the Flow Variable data node.
  3. Write them with the Set Flow Variable effect.

Broadcaster Variables​

Persistent and shared across all of your flows. They survive between runs and streams. Use them for death counters, sub counters and toggles that carry over.

  1. Read them with the Broadcaster Variable data node.
  2. Write them with the Set Broadcaster Variable effect.

Variable Types​

  • String: Text.
  • Number: Numbers.
  • Boolean: True or false.
  • Lists: A list of one of the above.
  • Custom types: Your own object types, as single values or lists. See Custom Types.
  • Text Style: One of your text styles, picked from tiles. See below.

The type is set when you create the variable. A custom-typed variable's fields are addressable in {{template}} tokens by path, such as {{broadcaster.champion.username}} for the username field of your champion variable.

Text Style Variables​

Flow variables, overlay variables and streamer variables can be type Text Style. The value is picked from style tiles, and the variable always holds a style.

Set Streamer Variable, Set Overlay Variable and Set Flow Variable take a Text Style value from a connected Text Style Data node. Their own value field is disabled and says "Connect a Text Style node".

Overlay widgets can follow a streamer or overlay variable of this type and redraw when a flow changes it. See Linking a style to a variable.

Example: Death Counter​

  1. Add a Chat Command trigger set to death.
  2. Add a Change Broadcaster Variable effect with Variable deaths, Operation Add and Amount 1.
  3. Connect the trigger to the effect's Activate input.
  4. Add a Generate Text node with the template Death count: {{0}} and connect the effect's Value output to it.
  5. Add a Send Chat Message effect to post the count.

Two deaths at the same moment both count.