Array Operations alters an Array, present in a Variable. These operations allow you to access indeces or resize it.
| Name | Explanation |
|---|---|
| Get | Gets the value at an Index, if valid. |
| Set | Sets the value at an Index, if valid. |
| Name | Explanation |
|---|---|
| Get | Gets the length of the Array. |
| Set | Sets the length of the Array. |
Note: When increasing the size of the Array, new Indeces will be filled with a blank value, similar to unused Variables.
This gets the Index 0, inside the Array stored in Global Variable 0 and saves it into Global Variable 77.
{"Data":{"ArrayIndex":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"ArrayReference":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":null,"VariableIndex":0,"Metadata":null},"IsCount":0,"IsGet":1,"IsIndexer":1,"IsSet":0,"Operand":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":null,"VariableIndex":77,"Metadata":null},"Index":0,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.ArrayCommand"}
This sets the value at the Index, specified by Global Variable 2, inside the Array stored in Global Variable 0 to 45.
{"Data":{"ArrayIndex":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":2,"Metadata":null},"ArrayReference":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":null,"VariableIndex":0,"Metadata":null},"IsCount":0,"IsGet":0,"IsIndexer":1,"IsSet":1,"Operand":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"45","VariableIndex":77,"Metadata":null},"Index":0,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.ArrayCommand"}
This sets the Size of an Array stored in Global Variable 1 to 20.
{"Data":{"ArrayIndex":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":2,"Metadata":null},"ArrayReference":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":null,"VariableIndex":1,"Metadata":null},"IsCount":1,"IsGet":0,"IsIndexer":0,"IsSet":1,"Operand":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"20","VariableIndex":77,"Metadata":null},"Index":0,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.ArrayCommand"}
This gets the Size of an Array stored in Global Variable 1 and saves it into Global Variable 2.
{"Data":{"ArrayIndex":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"0","VariableIndex":2,"Metadata":null},"ArrayReference":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":null,"VariableIndex":1,"Metadata":null},"IsCount":1,"IsGet":1,"IsIndexer":0,"IsSet":0,"Operand":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"20","VariableIndex":2,"Metadata":null},"Index":0,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.ArrayCommand"}