Creator Docs

Conditional

Conditional checks a variable. Then it runs different actions for different values. For example, if the reader has the key, the visual novel goes to one section. If not, it goes to another section.

The reader does not see a choice. To let the reader choose, use Choices.

Before you start

A Conditional needs a variable to check. Create the variable first on the Variables page. This page uses this example:

  • The variable is Has Key. Its Type is Boolean, so it is either True or False. Its Default is False.
  • The Prologue scene has two more sections: Open Door and Locked Door. To add a section, see Scene Editor.

To change the variable during the visual novel, add Update Variable to an earlier line.

Add a Conditional

  1. In the scene editor, tap an empty line, such as line 2 of Section 1. The visual novel does not stop on this line, so its text would not show.

  2. Open the Actions menu.

    • Phone or tablet: Tap the + button in the bottom bar.
    • Desktop: Click the + button under Presentation state.
  3. Under Logic, tap Conditional. You may need to scroll down first.

    The Actions menu on a phone, scrolled down. Conditional, under Logic, is marked. The Actions menu on desktop, scrolled down. Conditional, under Logic, is marked.

    The Conditional box opens.

Parts of the Conditional box

This is the box after you finish the example on this page.

The Conditional box on a phone with one branch and a default branch. Five parts are numbered from 1 to 5. The Conditional box on desktop with one branch and a default branch. Five parts are numbered from 1 to 5.
  1. Branches: the list of branches. Each branch checks the variable and has its own actions.
  2. + Add Branch: adds a new branch.
  3. Default branch: runs when no branch above it matches.
  4. Three dots button (the button with three dots): opens the menu of the branch.
  5. Submit: saves the Conditional on the line.

Add a branch

A branch has a condition and actions. When the condition is true, the branch runs its actions.

  1. Tap + Add Branch. The Branch box opens.

  2. Under Variable, choose Has Key. Operator shows Equals.

  3. Under Value, choose True.

  4. Under Actions, tap +.

    The Branch box on a phone. Variable is Has Key, Operator is Equals, and Value is True. The + button under Actions is marked. The Branch box on desktop. Variable is Has Key, Operator is Equals, and Value is True. The + button under Actions is marked.

    A list of actions opens.

  5. Tap Section Transition.

    The list of actions for a branch on a phone: Section Transition, Reset Story At Section, and Update Variable. Section Transition is marked. The list of actions for a branch on desktop: Section Transition, Reset Story At Section, and Update Variable. Section Transition is marked.
  6. Under Scene, choose Prologue.

  7. Under Section, choose Open Door.

  8. Tap Submit. The action shows under Actions as Prologue - Open Door.

  9. Tap Save Branch.

The branch shows in the Branches list as Has Key equals True.

Add the default branch

The default branch has no condition. It runs when no branch above it matches. A Conditional can have one default branch. It always stays at the bottom.

  1. Under Default branch, tap + Add Default Branch.

  2. Under Actions, add a Section Transition to Locked Door. Use steps 4 to 8 of "Add a branch".

  3. Tap Save Default Branch.

The Default branch shows 1 action.

Save the Conditional

At the bottom of the Conditional box, tap Submit. The box closes. A gear icon shows at the right end of the line.

The scene editor on a phone after Submit. Line 2 of Section 1 has a gear icon, which is marked. The scene editor on desktop after Submit. Line 2 of Section 1 has a gear icon, which is marked.

How branches are checked

When the visual novel reaches the line, the Conditional checks the branches from top to bottom.

  • It runs the first branch that matches. It skips the branches below it.
  • If no branch matches, it runs the Default branch.
  • If nothing matches and there is no default branch, nothing runs. The visual novel goes on to the next line.

In the example, Has Key starts as False. So the default branch runs, and the visual novel goes to Locked Door.

Operators

The Operator says how to compare the variable with the Value. Some operators work only with numbers.

Operator The branch matches when the variable Variable types
Equals is the same as the value String, Number, Boolean
Does Not Equal is not the same as the value String, Number, Boolean
One Of is the same as one of the values String, Number, Boolean
Greater Than is more than the value Number
Greater Than or Equal is more than the value or the same Number
Less Than is less than the value Number
Less Than or Equal is less than the value or the same Number

For One Of, tap Add Value to add more values to the list. For a Boolean variable, choose True or False as the Value. For Number and String, type the value. If a String variable uses Enum, choose from its list.

Actions a branch can run

A branch can run these actions:

Only one action in a branch can move the visual novel to a section. If you add a second one, it replaces the first.

Change or delete a branch

To open the Conditional again, tap its line. Tap the + button, then tap Conditional. The box shows your branches.

  • Change a branch: Tap the branch. Change it, then tap Save Branch.
  • Move or delete a branch: Tap the three dots button of the branch. On desktop, you can also right-click (click with the right mouse button) the branch. Then tap Move Up, Move Down, or Delete.

Delete removes the branch at once, without asking first. Move Up and Move Down show only when the branch can move. The menu of the default branch has only Delete. When you finish, tap Submit to save your changes.

Good to know

  • A line can move the visual novel in only one way. Adding a Section Transition to the line itself removes the section jumps inside the branches.

Next steps