Docs
Download

Get and Set Variable

Read a variable's value and change it by setting, adding or toggling.

Get Variable reads the current value of a variable, Set Variable changes it. Both work with local and global variables. Pick the variable in the search field on the node; its sockets take the variable's type.

Get Variable

Variable (search field)The Local Variable or Global Variable node to read. Lists the global variables of the add-on and the local variables of this tree
Value (output)The variable's value at the moment the node that uses it runs

Get Variable has no flow sockets: connect Value wherever you need it. The arrow button next to the search field jumps to the variable's node.

Set Variable

Variable (search field)The variable to change
Operation (dropdown)How to change it, see below
Value / Amount (input)The new value, or the amount to add
OperationDoesInput
SetGives the variable a new valueValue
Change ByAdds Amount to the current value. Numbers count up (down with a negative amount), text gets Amount added to its end, a list gets the items of a list Amount addedAmount
ToggleSwitches a Boolean between True and Falsenone

The flow continues at the output once the variable has changed.

Errors on the node

MessageFix
Pick a variableThe search field is empty
The variable it used was deletedIts Local Variable or Global Variable node was removed: pick another
Local variables can only be used in their own treeThe node was copied into another tree; use a Global Variable there

Change By uses Python's +, so both values must fit together: adding a number to text fails when it runs. Turn the number into text first, or use Set with a Combine Strings.