Change Variable alters the value of a Variable. It can also apply to a range of variables, and operate on Local or Global variables.
| Name | Explanation |
|---|---|
| Global / Local | Targets a single Variable. |
| Global / Local Range | Targets multiple contiguous Variables. |
| Global / Local Reference | Targets a single Variable based on a Variable index. |
| Name | Explanation |
|---|---|
| Value | Leverages a value, as a Number or String. |
| Local | Leverages a single Local Variable. |
| Global | Leverages a single Global Variables. |
| Random | Leverages a random Number value, between a Minimum and Maximum. |
| Name | Explanation | Type |
|---|---|---|
| Operation | The operation to perform on the variable. | Operator |
This sets the Global Variable 3 to a random value between 6 and 12.
{"Data":{"Operation":0,"RandomEnd":"12","RandomStart":"6","Value":"","Index":3,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.VariableCommand"}
This adds 20 to Local Variables 0 - 6.
{"Data":{"Operation":1,"RandomEnd":null,"RandomStart":null,"Value":"20","Index":0,"IndexEnd":6,"IsLocal":1,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.VariableCommand"}
This subtracts 1 from a Global Variable, with an index specified by Global Variable 0.
{"Data":{"Operation":1,"RandomEnd":null,"RandomStart":null,"Value":"20","Index":0,"IndexEnd":6,"IsLocal":1,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.VariableCommand"}
This multiplies by 5 to the value in a Global Variable, with an index specified by Local Variable 0.
{"Data":{"Operation":3,"RandomEnd":null,"RandomStart":null,"Value":"5","Index":0,"IndexEnd":null,"IsLocal":1,"IsOperandReference":0,"IsReference":1,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.VariableCommand"}
This sets the Local Variable 0 to the value in Global Variable 5.
{"Data":{"Operation":0,"RandomEnd":"","RandomStart":"","Value":"","Index":0,"IndexEnd":null,"IsLocal":1,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":5,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.VariableCommand"}