Code Block
Code Block¶
Groups commands into a single block that can be commented out to disable all contained commands.
Properties¶
System¶
| Name | Explanation | Type |
|---|---|---|
| Commands | The commands to execute when the block is not commented out. | Script |
| Comment | The comment text displayed when the block is commented out. | String |
| Ignore | Whether the block is commented out. When enabled, the commands inside the block are skipped during execution. | Toggle |
Examples¶
Group Commands in a Block¶
This groups commands into a single block that executes normally.
{"Data":{"Commands":[{"$":"WaitCommand","Duration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"100","VariableIndex":0,"Metadata":null},"IsBlockingInput":false,"Metadata":null}],"Comment":null,"IsCommented":false,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Flow.CodeBlockCommand"}
Disable a Block of Commands with a Label¶
This disables (comments out) a block of commands so they are skipped during execution. The label provides context for why the block is disabled.
{"Data":{"Commands":[{"$":"WaitCommand","Duration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"100","VariableIndex":0,"Metadata":null},"IsBlockingInput":false,"Metadata":null}],"Comment":"Disabled for testing","IsCommented":true,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Flow.CodeBlockCommand"}