Skip to content

Logic actions

6 actions in the Logic category. Each block mirrors how the action appears in the editor's sidebar.

Combine Checks

Every Frame
Combine Checks Logic
First true | Mode 'and' | Second true

Joins two tests into one, demanding both or accepting either. It is what a condition with two parts needs before reaching Do If or Pick Value.

Input Type Default Description
First bool true The first test.
Mode String 'and' Whether both tests have to pass, or just one of them.
Second bool true The second test.
Output Type Description
Result bool The answer of the two tests together.

Phases StartEvery FramePhysicsEnd

Compare

Every Frame
Compare Logic
A 0 | Operator '==' | B 0 | → True | → False

Answers how two values compare, using the operator picked in the middle. It can branch on the answer or hand it to a field that takes a yes or no.

Input Type Default Description
A Variant 0 The left value in the comparison.
Operator String '==' How to compare the two values.
B Variant 0 The right value in the comparison.
Output Type Description
Yes bool Where to store the answer of the comparison.
Branch Goes to
True Where to go when the comparison is true.
False Where to go when the comparison is false.

Phases StartEvery FramePhysicsEnd

Is Empty

Every Frame
Is Empty Logic
not set | → Empty | → Has Something

Checks whether a value holds nothing and branches on the answer. Text, lists and dictionaries are empty when they have no items, a value that is missing counts as empty, and a number always counts as something.

Input Type Default Description
Value Variant - The text, list or dictionary to check.
Branch Goes to
Empty Where to go when the value has nothing in it.
Has Something Where to go when it holds something.

Phases StartEvery FramePhysics

Is Near

Every Frame
Is Near Logic
A not set | B not set | Distance 4.0 | → Yes | → No

Checks whether two positions are close enough to count as the same spot. Use it to tell that something arrived, since a value that eases toward a target keeps getting closer without ever landing on it.

Input Type Default Description
A Variant - The first position, such as where the node is right now.
B Variant - The second position, such as where it is heading.
Distance float 4.0 How close the two have to be to count as arrived, in pixels or units.
Branch Goes to
Yes Where to go once the two are close enough.
No Where to go while they are still apart.

Phases StartEvery FramePhysics

Is Valid

Every Frame
Is Valid Logic
not set | → True | → False

Answers whether an object is still alive, which is false once it was freed. It can branch on the answer or hand it to a field that takes a yes or no.

Input Type Default Description
Object Variant - The variable holding the object to check.
Output Type Description
Yes bool Where to store whether the object is still alive.
Branch Goes to
True Where to go when the object is still valid.
False Where to go when the object has been freed.

Phases StartEvery FramePhysics

Pick Value

Every Frame
Pick Value Logic
Condition true | If True 0 | If False 0

Picks between two values depending on a condition and keeps the chosen one.

Input Type Default Description
Condition bool true The test that decides which value is taken.
If True Variant 0 The value taken when the condition is true.
If False Variant 0 The value taken when the condition is false.
Output Type Description
Result Variant The value that was picked.

Phases StartEvery FramePhysicsEnd