- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3
Choices, Conditions, and Variables
This is the core logic system that makes your story interactive. Understanding how these three elements work together is key to creating a dynamic and branching narrative.
Variables are your story's memory. They are simple boolean (true/false) flags that you can use to track anything you want.
- 
Examples: has_key,is_poisoned,player_is_trusted.
Managing Variables:
Click the {...} icon above the "Add Choice" button to open the Variable Manager. Here you can add new variables and delete existing ones.
Choices are the options presented to the player. When a player clicks a choice, it triggers an Action.
Adding a Choice:
Click the round + button at the bottom of the Choices list in the Scene Editor.
Configuring a Choice Action: Each choice has a text field and a dropdown menu.
- Button Text: What the player reads on the button.
- 
Action Dropdown: What happens when the button is clicked.
- Go to Scene: Select a scene ID from the list. The player will be navigated to that scene.
- 
Set Variable: Select a variable from the list. A second dropdown will appear, allowing you to set the variable to TrueorFalse.
 
Silent Actions:
If you leave the "Button Text" field empty, the choice becomes a silent action. It will execute its action automatically as soon as the scene loads, without displaying a button. This is useful for setting a variable upon entering a scene (e.g., setting has_visited_town to True).
Conditions are rules that determine whether a choice is visible to the player.
Adding a Condition:
Click the fork icon (<--) on the left side of a choice editor. This will reveal the condition builder UI.
Configuring a Condition: A condition is a simple "If... Is..." statement.
- 
IfDropdown: Choose what to check.- Variable: Select one of your defined variables.
- Scene (Visited?): Select a scene ID to check if the player has visited it before.
 
- 
IsDropdown: Choose the required state.- True
- False
 
Example Use Cases:
- 
Scenario: A door can only be opened if the player has a key. - 
Variable: has_key(defaults to false).
- 
Choice on another scene: "Pick up the old key." -> Action: Set has_keytoTrue.
- 
Choice at the door: "Unlock the door with the key." -> Condition: If [has_key] Is [True]. This choice will only appear after the player has picked up the key.
 
- 
Variable: 
- 
Scenario: A character gives different dialogue if you've already met their boss. - 
Choice with the boss: "Talk to the boss." -> leads to scene boss_office.
- 
Choice with the character: "Heard you were looking for me." -> Condition: If [boss_office] (Visited?) Is [True].
- 
Another choice with the character: "Who are you?" -> Condition: If [boss_office] (Visited?) Is [False].
 
- 
Choice with the boss: "Talk to the boss." -> leads to scene