Set Global Variable
Create or update the value of a global variable

Parameters
Global
Select the destination type for the global variable
| Value | Description |
|---|---|
Global | Set a general global variable (non user variable) |
User (redeemer) | Set a user global for the user who activated the currently executing action |
User (target) | Set a user global for the user found in the |
Persisted
Toggle between Persisted and Non-Persisted variables
| Value | Description |
|---|---|
Persisted | These variables persist across Streamer.bot restarts |
Non-Persisted | These variables should be considered temporary and will be wiped at shutdown |
Enter the name of the global variable you would like to create or update
Variable Name is the name of the global variable, which means it should not be wrapped in % symbols unless you specifically want to use the value of a local variable as the name of your global variableEnter the value to assign to the global variable, depending on the selected type in the dropdown
All options support parsing of %arguments%
Value- Enter any valueIncrement- Enter anyintto be added to the existing valueDecrement- Enter anyintto be subtracted from the existing value
Increment and Decrement default to 1. If the global variable did not already exist, it will add or subtract from 0Variables
| Name | Type | Description |
|---|---|---|
| No data | ||
C# Usage
public void SetGlobalVar(string varName, object value, bool persisted = true)