Storyline 1: Evaluating Text Variables

Article Last Updated

This article applies to:

Storyline makes it easy to present dynamic content based on a learner's choices. In this example, we'll work with timeline triggers to branch learners to specific slides based on their earlier choices. Take a look at what we're going to build:

View the published example | Download the source file

When you first look at it, you might think that the button triggers are showing the layers. While that's certainly possible, that's not how this example works. The button triggers are actually adjusting a variable to "true" or "false" while a timeline trigger listens for that variable to change. Based on the variable, the course will branch to one of two slides. It's really cool.

If you're following along, I'm working in EvaluateVariable_START.story.

Step 1: Create the Project Variable

  1. In the triggers panel, click the Manage project variables icon
  2. Create a new variable
    • Name: Agree
    • Type: Text
    • Value: (blank)
  3. Click OK

Step 2: Insert a Variable Reference on the Slide

  1. Go to Insert > Text > Text box and click once on the slide to create an active text box
  2. Go back to Insert > Text > Reference to bring up the project variables
  3. Select the variable you created and click OK

Step 3: Add Button Triggers to Adjust the Variable

  1. Select the green button and add a new trigger
  2. Action: Adjust variable
  3. Variable: Agree
  4. Operator: = Assignment
  5. Value: Value, Agree
  6. When: User clicks
  7. Object: Agree button
  8. Click OK

Duplicate the button trigger

  1. In the Triggers panel, copy and paste the trigger to duplicate it
  2. Change the value to: Disagree
  3. Change the Object to: Disagree button
  4. Click OK

Step 4: Add a Timeline Trigger to Evaluate Which Button Is Clicked

Here's where things come together. The button triggers adjusted the variable so now we can evaluate which button is clicked and give our learners the appropriate content.

Create a new trigger

  • Action: Jump to slide
  • Slide: 1.2 Agree
  • When: User clicks
  • Object: Continue button

Show conditions:

Agree == Equal to Agree

Duplicate the trigger and update for a disagree value.

  1. Select the trigger you just created and copy paste it
  2. Change the targeted slide to 1.3 Disagree
  3. Change the Agree value to Disagree
  4. Preview your project

Because Storyline's variables are persistent, you can evaluate variables at any time during a project.