Skip to content
BloopbotDocumentation

Build with flows

Keep a counter with variables

Store a death count, update it from a flow and reuse it in chat or OBS.

5 min readUpdated

1. Declare what you want to remember

Open Variables and declare a variable with key deaths, a number type, channel scope and a starting value of 0. Choose its reset policy deliberately: keep it across streams for a running total, or use a stream reset for a session count.

Channel scope stores one value for the stream. Viewer scope stores a separate value for each viewer. Use channel scope for a shared death counter.

2. Change it from a flow

Build a command flow, add a permission check if only moderators should change the number, and add Set a variable from the node library. Choose deaths, use the add operation and set Value to 1. Follow it with a Chat message action:

Death count: $(var.deaths)

Save the flow and inspect a test run. The dry run does not persist changes to your real counter. Trigger the enabled command in chat, then check its value on Variables.

3. Reuse the value

ValueUse
$(var.deaths)A channel variable you declared
$(var.user.streak)A viewer variable named streak, in a viewer context
$(data.last_raid.viewers)Channel data recorded by the bot

Use the editor’s Insert… menu to pick data available in the current flow. A viewer variable needs a viewer context; a timer does not inherently identify a viewer.

4. Show it in OBS

Create a Label widget with a Counter preset and select the same variable. Follow the hosted widget guide to add its URL to OBS. Updating the saved value gives chat and your overlay the same count.

Was this guide helpful?