Conditions
Conditions allow you to add logical gates to your narrative. They are based on variables and are used in different places.
- In the actions of sequences and choices
- In the redirections of sequences and choices
- On choices and gauges to control their display
- In achievements and events as triggers
Adding a Condition
To simplify this documentation, we will discuss conditions related to actions. However, be aware that the functioning of conditions is identical wherever they can be applied.
To add a condition, start by creating an action, then click on the associated Condition button. A modal window will then open, allowing you to select the type of condition and define its parameters.
Condition addition modal.
Types of Conditions
Conditions are based on different types of criteria.
Flag Conditions
Flags are boolean variables. Their condition criteria are:
- is true: The condition is met if the flag is
true
. - is false: The condition is met if the flag is
false
. - equals another flag: The condition is met if the value of the flag matches that of another flag.
Object / Hero Conditions
These conditions concern the objects or heroes that the player possesses:
- owns the object: The condition is met if the player owns the object.
- does not own the object: The condition is met if the player does not own the object.
Passage Conditions
Passage conditions check whether the player has gone through a certain sequence:
- has passed through the sequence: The condition is met if the player has passed through the specified sequence.
- has not passed through the sequence: The condition is met if the player has not passed through the specified sequence.
Counter Conditions
Counters are numerical variables. The condition criteria for counters perform comparisons:
- =: The condition is met if the value of the counter is equal to a specific value.
- !=: The condition is met if the value of the counter is different from the specified value.
- <, >, <=, >=: These comparisons check whether the value of the counter is respectively less than, greater than, less than or equal to, or greater than or equal to a given value.
Text Variable Conditions
Text variables are character strings. The available condition criteria for these variables are:
- is equal to the selected value: The condition is met if the text variable is equal to a given value.
- is different from the selected value: The condition is met if the text variable is different from the given value.
Multiple Conditions
Example of a sequence with a multiple condition.
Multiple conditions allow you to combine several conditions with the AND and OR operators:
- AND: All criteria must be met for the condition to be satisfied.
- OR: At least one of the criteria must be met for the condition to be satisfied.
This allows you to create complex conditions like:
- If score >= 70 AND score <= 90
- If owns object A OR owns object B
- If owns object A AND has passed through sequence X
Advanced Uses of Conditions
Hiding Choices
You can use conditions to hide choices in your story. This is done by adding a visibility condition to a choice. To do this, click on the button in the choice block.
Example of a choice with a visibility condition.
When the condition is met, the choice will be visible to the player. Otherwise, it will be hidden.
Displaying a Gauge
Conditions can also be used to display a gauge only at certain moments in the narrative.
Example of a gauge with a visibility condition.
Other Uses...
Conditions can be used as triggers in achievements and events.