Like Set Variable, but with an additional input for the variable to store the value in. This enables you to store a variable in a List Element, or make custom script blocks that modify variables.

Inputs:

  • Variable: the variable to be modified. This can be connected to the output of List Element to set the respective index of the variable.
  • Value: the new value given to the variable.

Example

You can find an example of making lists in the List Element page. So we'll focus on another use.

Let's say we want to recreate the Increase Number block.

We have the increased number, now we have to set that value to the input variable, but how?

The Set Reference block was the originally how we set variables, until the Set Variable with only a value input was added, which is limited but more convenient and optimal. But Set Reference can be used for custom script blocks that modify input variables.

Related