> For the complete documentation index, see [llms.txt](https://help.craftsmanplus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.craftsmanplus.com/play/settings/progression/conditionals.md).

# Conditionals

A Conditional is an action that checks your variables the moment it fires and runs different actions depending on what it finds. Branch to a win or lose scene based on the final score, show a badge only when lives remain, or send high scorers to a bonus scene, all from a single action.

Conditionals are the branching side of the progression system. Where [triggers](/play/settings/progression/triggers.md) watch a variable continuously and react the instant a condition is met, a Conditional evaluates once, at the moment its action fires: at the end of a scene, on a tap, when a video finishes. Logic is built as IF, ELSE IF, and ELSE chains from your project's [variables](/play/settings/progression/variables.md).

#### Adding a Conditional

Select **Conditional** in the action selector, directly below **Update Progression**. The properties popup then shows two controls:

* **Configure** opens the full screen Conditional Properties modal, where you build your logic.
* **Go to Progression** closes the popup and jumps to the [Progression](/play/settings/progression.md) section in project settings, so you can review or add variables without losing your place.

#### The Conditional Properties Modal

Clicking **Configure** opens a dedicated full screen workspace. Your logic blocks live on the canvas, and the **Available Variables** panel on the right lists everything they can reference. Zoom and undo controls sit at the top right of the canvas: zoom works just like the editor viewport's [zoom controls](/play/general/editor/zoom-controls.md), and undo history lasts for the current session.

Nothing is committed until you're done. **Confirm** saves your changes to the Conditional action and closes the modal, while **X** closes without saving and discards them.

#### Available Variables

The panel on the right lists every variable your conditions can reference, grouped into three sections:

* **Scene** lists Scene Duration and Global Timer.
* **Progression** lists every variable from your project's [Variables](/play/settings/progression/variables.md) tab, and stays in sync with it.
* **Game** appears only when the scene contains a Game Mechanic layer. The section is titled with the game's name and lists that game's variables.

Each row shows the variable's name and its starting value, not its live value during play.

{% hint style="info" %}
One condition can mix variables from different sections, like a game's score alongside a project level Health variable.
{% endhint %}

#### Building a Block

A block is a chain of tiles that reads top to bottom: one IF tile, any number of ELSE IF tiles, and an optional ELSE at the bottom.

**The IF Tile**

Every block starts with an IF tile, and the modal places one on the canvas for you the first time it opens. A tile reads like a sentence: IF the conditions are true, THEN run the actions.

* The **condition row** pairs a variable with an operator and a value, like Score **>=** 100. The variable selector lists everything in the Available Variables panel.
* The **+** below the conditions adds another row, joined to the ones above by an **AND**/**OR** dropdown. Added rows can be removed with their minus button; every tile keeps at least its first row.
* The **THEN** section holds the actions that run when the conditions pass. The action selector opens the platform-wide action list, so anything an interaction can do, a Conditional can do. The **+** adds more actions, each removable with its minus button.

There are six operators:

| Operator | The condition is true when...                      |
| -------- | -------------------------------------------------- |
| **>=**   | The variable is greater than or equal to the value |
| **>**    | The variable is greater than the value             |
| **<=**   | The variable is less than or equal to the value    |
| **<**    | The variable is less than the value                |
| **=**    | The variable is exactly equal to the value         |
| **!=**   | The variable is anything other than the value      |

**ELSE IF and ELSE**

* **ELSE IF +** below the last tile in a block adds a branch that's only checked when the tiles above it fail. ELSE IF tiles match the IF tile's structure and behavior, and as many can stack as you need, each connected by a dotted line.
* The caret on an ELSE IF tile's header offers **ELSE**, the fallback branch that runs when nothing above it passes. Converting removes the tile's condition section but keeps any configured actions. The ELSE is always the bottommost tile, and each block can only have one.

Removing an ELSE IF or ELSE removes just that tile. Removing the IF tile removes the entire block, including everything below it.

**Multiple Blocks**

The **IF +** button at the top right of the canvas adds a new, independent block. Each block is its own chain, so unrelated pieces of logic don't have to share one.

#### How Conditionals Evaluate

When the Conditional action fires:

1. Blocks evaluate independently, left to right in canvas order. Every block whose conditions pass fires its actions; blocks are not exclusive with each other.
2. Within a block, only one branch ever fires. If the IF passes, its actions run and the rest of the block is skipped. If it fails, ELSE IF tiles are checked top to bottom and the first one that passes runs. If nothing passes, the ELSE runs. With no ELSE and nothing true, the block does nothing.
3. **AND** binds tighter than **OR**. Consecutive AND conditions group first, then OR evaluates across the groups: A AND B OR C AND D reads as (A AND B) OR (C AND D).
4. Multiple actions in one THEN fire in order, top to bottom.

{% hint style="info" %}
A Conditional only checks values at the moment it fires. To react the instant a variable crosses a threshold at any point in a scene, use a [trigger](/play/settings/progression/triggers.md) instead.
{% endhint %}

#### Common Patterns

* **Score based branching**: at the end of a game scene, IF Score **<=** 33 starts the low score scene, ELSE IF Score **<=** 66 starts the mid score scene, ELSE starts the high score scene. Since branches evaluate top down, the middle branch doesn't need a lower bound.
* **Win gate with two requirements**: IF Score **>=** 100 AND Health **>** 0 starts the win scene, ELSE starts the fail scene. Both conditions have to pass.
* **Independent outcomes**: one block shows a badge layer IF Score **>=** 50, while a second block navigates IF Health **>** 0. When both pass, both fire.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.craftsmanplus.com/play/settings/progression/conditionals.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
