Conditions
Build conditions from resources, flags, achievements and system states, and combine them with All, Any and NOT.
Conditions
Conditions decide when something may happen. The same condition editor appears everywhere Leap Studio needs one:
- the Unlock condition of an achievement
- the Conditions in an entitlement's Availability
- the Conditions of a custom operation
- the Conditions of an operation inside a system
- the Conditions of an exit in a system
Instead of describing the condition editor with screenshots, this page embeds the real one from Leap Studio, set up with the example game used throughout these docs.
Demo mode: the editors below are fully interactive, but nothing you do here is saved. Use the Reset button at the top-right of each demo to restore its starting state.
Adding a Condition
Click + Add condition, then pick an element under "Select element…". The picker searches every kind of element at once, and the element you pick decides the rest of the row:
- Resource, constant or achievement — an operator (
<,<=,==,>=,>or!=) and a value to Compare against. The value can be a plain number or an expression — see Values and Expressions. A new row starts at>= 0. - Flag — is true or is false.
- System — is or is not, and a state picked from "— state —".
The example below passes while the player holds at least 100 gold. Try changing the operator or the amount, or pick a different element:
Combining Conditions
With two or more rows, Match appears above them:
- All — "Every row must pass (AND)".
- Any — "At least one row must pass (OR)".
+ Group adds a nested group of rows with its own Match setting, so you can mix the two. The example below passes with 250 gold together with 100 XP (a nested All group), or with 30 gems:
Click the NOT pill at the start of a row — or of a group — to negate it. The example below requires the tutorial to be done and NOT energy == 0:
Checking a System's State
Pick a system to ask which state a player is in. Only states are listed — never randomizers, because a player is never in one. The example below passes while Main Quest is in Chapter 2:
Empty Conditions
A condition with no rows always passes, so leaving one empty means "always". The one exception is an achievement's Unlock condition: an achievement with an empty unlock condition never unlocks on its own — see Creating Achievements.
Copying Conditions
Where a Conditions section offers them — on operations, exits and custom operations — Copy these conditions copies its rows, and Replace with the copied conditions pastes them over another section's. Copied conditions stay available in the same browser tab.
Next Steps
Continue to Values and Expressions to learn what you can compare against.