Set User Variable
Runs on: Backend.
Assigns a value to a User Variable for one viewer. User variables persist across stream sessions, so use them for point totals, scores and streaks.
Inputs
| Name | Type | Description |
|---|---|---|
user | User | The viewer whose variable to set. |
value | string, number, or boolean | The new value for that viewer. |
Configuration
- Variable: The user variable to set.
Example
On a channel-point redeem, read the viewer's redeemCount with a Get User Variable node, add 1 with a Math node and feed the result into value. Every viewer gets their own tally.