Change Switch alters the value of a Switch. It can also apply to a range of switches, and operate on Local or Global switches.
| Name | Explanation |
|---|---|
| Global / Local | Targets a single Switch. |
| Global / Local Range | Targets multiple contiguous Switches. |
| Global / Local Reference | Targets a single Switch based on a Variable index. |
| Name | Explanation |
|---|---|
| Value | Leverages a value, as a Toggle (On or Off). |
| Local | Leverages a single Local Switch. |
| Global | Leverages a single Global Switches. |
| Random | Leverages a random state. |
This sets the Global Switch 0 to a random value.
{"Data":{"Random":1,"Value":0,"Index":0,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.SwitchCommand"}
This sets Global Switches 0 - 99 to Off.
{"Data":{"Random":0,"Value":0,"Index":0,"IndexEnd":99,"IsLocal":0,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.SwitchCommand"}
This sets a Global Switch, with an index specified by Global Variable 3, to On.
{"Data":{"Random":0,"Value":1,"Index":3,"IndexEnd":null,"IsLocal":0,"IsOperandReference":0,"IsReference":1,"OperandGlobalIndex":null,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.SwitchCommand"}
This sets the Local Switch 0 to the value in Global Switch 0.
{"Data":{"Random":0,"Value":0,"Index":3,"IndexEnd":null,"IsLocal":1,"IsOperandReference":0,"IsReference":0,"OperandGlobalIndex":0,"OperandLocalIndex":null,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Data.SwitchCommand"}