Skip to main content

Logic

Conditions return true or false. Branch blocks use those values to decide which action stack runs. Value-selecting blocks instead return a value to another input.

Branches and outcomes​

if … do

Runs the body only when its condition is true.

if … do … else

Runs the first matching branch. Add up to 50 else-if branches; later branches are skipped after a match. Else runs only if none match.

if … then value … else value

Returns one of two values. Only the chosen value is evaluated. Both must suit the receiving input, such as Color, Text, or Number.

if random chance … % then … else

Makes a percentage-based choice between two action branches. Use 0 for never and 100 for always.

if lock is frozen then … else

Chooses a branch from the lock's frozen state.

random outcome branches

Picks one weighted branch at runtime. Supports 2–50 branches.

outcome weight

One branch inside Random outcome. Supply a positive weight and its actions. Chance is that weight divided by total weight.

Weights 1, 1, and 2 give chances of 25%, 25%, and 50%. These are relative weights; they do not need to total 100.

Conditions​

event text …

Choose a text value from the enclosing event and compare with literal text. Equals/not-equals are case-sensitive; contains/not-contains/starts-with/ends-with ignore case.

compare values

Compare two values with =, !=, <, <=, >, or >=. Use compatible types, especially for numeric ordering.

value is one of … options

Tests equality against 2–12 connected options.

text … contains …

Case-insensitive substring check.

condition AND / OR / XOR / NAND / NOR / XNOR condition

Combines two Booleans. AND requires both; OR at least one; XOR exactly one. NAND, NOR, and XNOR invert those results.

not

Inverts a Boolean.

lock is frozen

Returns the frozen-state Boolean.

random chance … %

Returns a random Boolean for the percentage. Store the result in a variable if several later checks must share one decision.

true / false

A fixed Boolean. Useful for active/visible controls and enabling or disabling behavior.

Example: choose a message and color​

Create a Boolean ready. Connect a value-selecting if to a button's title: if ready, return "Ready"; otherwise return "Waiting". Use a second value-selecting if for its color. Set the button's active input to ready.

For action branches, put the actions inside if … do … else. Putting them after the whole block runs them after either branch.