LogicBlock 2

Running and Checking Blocks

Run Block, Check Block, Stop Block and Is Block Running.

Running and checking Blocks

All of these are under LogicBlock in the instruction, condition and value windows. In their titles, the Block and list name uses the colour of its asset:

  • Instruction Block: blue, for example Run Deal Damage and wait.
  • Condition Block: green, for example Check Can Attack?.
  • LogicBlock: yellow, for example Run Enemy AI: Chase and wait.

These are Visual Script's own Blue, Green and Yellow, the same colours as the asset icons.

Run Block, Stop Block, Check Block and Is Block Running in an Event. Each Block name uses its asset's colour.
Run Block, Stop Block, Check Block and Is Block Running in an Event. Each Block name uses its asset's colour.
Run Block, Check Block, Stop Block and Is Block Running in Visual Script's window.
Run Block, Check Block, Stop Block and Is Block Running in Visual Script's window.

Run Block (instruction)

Runs an Instruction Block, or an Instructions list of a LogicBlock.

FieldMeaning
BlockThe Instruction Block or LogicBlock to run.
List(LogicBlock only) Which Instructions list to run. The picker shows each list's icon.
SourceThe game object used as Source inside the Block. Default: this Event's Source.
TargetThe game object used as Target inside the Block. Default: this Event's Target.
Wait To CompleteWait for the Block to finish before running the next instruction. When off, the Block runs on its own and the Event continues straight away.
ParametersA foldable section at the bottom, with one field per Block parameter. Hidden when the Block has none. See Parameter values in a call.

Check Block (condition)

Checks a Condition Block, or a Conditions list of a LogicBlock. It has the same Block, List, Source, Target and Parameters fields as Run Block. It's true when the Block's conditions pass, using the Block's Check setting (All or Any).

Check Block (Bool value)

The same check, as a value. In any Bool field, choose LogicBlock > Check Block. A Block's result can then drive anything that takes a Bool, not only conditions.

Stop Block (instruction)

Stops running calls of an Instruction Block or of a LogicBlock list.

FieldMeaning
BlockThe Block to stop. For a LogicBlock, pick one list or All Lists.
StopCalls With Source stops only the calls started with the given Source. All Calls stops every running call.
SourceThe Source the calls were started with. Used with Calls With Source.

Is Block Running (condition)

True while an Instruction Block or LogicBlock list has a running call.

FieldMeaning
BlockThe Block to look at. For a LogicBlock, pick one list or All Lists.
CallsWith Source: only calls started with the given Source. Any: calls started by anyone.
SourceThe Source to look for. Used with With Source.

Typical uses:

  • Run once: put Is Block Running (inverted) before a Run Block, so the Block isn't started again while it's busy.
  • Toggle: if the Block is running, stop it; otherwise run it. This is how the Pulse cube works in the examples.