Workshop.codes
Create

Set Global Variable At Index Last updated November 26, 2024

Description

Finds or creates an array on a global variable, which is a variable that belongs to the game itself, then stores a value in the array at the specified index.

Snippet

Set Global Variable At Index(variableName, 0, 0);

Properties

Returns: Void
Parameters: Variable, Index, Value

Variable
Type: Global Variable, Default: A
Specifies which global variable's value is the array to modify. If the variable's value is not an array, then its value becomes an empty array.

Index
Type: Integer, Default: Number
The index of the array to modify. If the index is beyond the end of the array, the array is extended with new elements given a value of zero.

Value
Type: Object | Array, Default: Number
The value that will be stored into the array.

Workshop.codes