Skip to main content

Conditional Logic

Overview

You can make certain parts of sequences conditional based on influence values. This enables dynamic narratives that adapt to user choices and story state.

Conditional Text

Conditional text is text within a scene that:

  • Appears or changes based on conditions
  • Linked to influence variables
  • Dynamic content that adapts

How It Works

When previewing your content:

  1. Influence tracks a value
  2. Condition checks the value
  3. Different text shows based on condition
  4. Content updates dynamically

Setting Conditions

Creating conditional text is similar to creating influences. You highlight text on your scene, and click the Beige button on the left side.

This action opens the Interaction Drawer with a list of all of your influences/variables. After this you can select which one you are going to use and configure the conditions.

Condition Types

Result Conditions

Make text conditional to the winning result of the interaction. This means, the result that averaged the biggest amount of votes from the audience in average.

Vote Count Conditions

Check number of votes from the audience and compare to threshold values.

Condition Operators

Available operators include:

  • Greater Than (>): Value is greater than threshold
  • Greater Than or Equal (>=): Value is greater than or equal
  • Equal (=): Value equals threshold
  • Not Equal (!=): Value doesn't equal threshold
  • Includes: String contains substring (for strings)

Conditional Text Examples

Example 1: Vote Count


If voteCount >= 3:

Show: "The majority chose this path."

Else:

Show: "A few people selected this option."

Example 2: String Matching


If userInput includes "yes":

Show: "You agreed to help."

Else:

Show: "You declined the offer."

Example 3: Boolean Check


If hasCompletedTutorial = true:

Show: "Welcome back, experienced user!"

Else:

Show: "Welcome! Let's get started."