Variables
Variables store values that can be read and updated across block stacks and scripts.
Variable command blocks
Set variable to (Beginner)
Sets selected variable to the specified value.
- Type: command block
- Typical use: initialize state, overwrite previous value
Change variable by (Advanced)
Adds the specified amount to selected variable.
- Type: command block
- Typical use: counters, score, accumulated distance/time
Variable value reporter
Variable value (Beginner)
Returns the current value of the selected variable.
- Type: reporter block
- Typical use: use variable value inside operators, conditions, and command inputs