Use variables to remember information—such as a learner's name or a numeric value—then display dynamic content based on that information (view Working with Variable References).

Variables are also a great way to add conditional interactivity to courses (view Working with Triggers). And the good news is you don't have to know anything about coding!

Adding Variables

  1. Click the Manage project variables icon in the Triggers panel.

  2. When the Variables window opens, click the Create a new variable icon (looks like a plus sign) in the upper right corner.

  3. Give your variable a recognizable name so it's easy to identify later.

    Variable dialog.
  4. Choose the Type of variable you want to create. Storyline 360 supports three types:
    • True/False: True/False variables are often called Boolean variables. They're either true or false. They're great for creating toggle buttons and restricting learners' options. For example, you might use a true/false variable to track whether a certain event has occurred, then let learners proceed to the next slide only when the variable is true.
    • Text: Text variables hold text values. Common uses include personalizing content by displaying the learner's name throughout a course and evaluating text-based interactions. Text variables can hold up to 32,767 characters.
    • Number: Number variables hold numeric values. Common uses for number variables include tracking the number of times a particular event has occurred and performing mathematical calculations.

      Number variables can hold static values, or you can make them random by entering starting and ending values for a range of numbers. Learn more about random number variables.
  5. Enter a default Value. (The default value for text variables can be blank.)
  6. Click OK to save your new variable.
  7. Click OK again to close the Variables window.

Storyline 360 automatically creates variables for you in the following cases:

When you create a...

These variables are created for you...

Result slide

Four number variables are added for scoring purposes by default. If you have a combined result slide that requires learners to pass each quiz, Storyline 360 also adds a true/false variable. Learn more.

Dial

A number variable is added to track the dial value.

Slider

A number variable is added to track the slider value.

Text-entry field

A text variable is added to track learners' input.

Numeric-entry field

A number variable is added to track learners' input.

Using Triggers to Adjust Variable Values

Need to change the value of a variable during a course? Easy. Just add an Adjust variable trigger. View this user guide to learn more about triggers.

Evaluating Variables in Trigger Conditions

You can use variables to add conditions to triggers. View this user guide for details.

For example, let's say you want to change the state of an object when a true/false variable is true. It'd look something like this:

evaluating variables in trigger conditions

Referencing Variable Values in Slide Text

Variables store data. Triggers let you adjust the data. And variable references let you display the data anywhere in your course, making your content dynamic and interactive.

For example, you might ask learners to enter their names on the first slide in your course. You store that information in a variable. Then you use variable references to personalize the rest of the course with their names.

In another example, you might ask learners to enter their weight and height. You store both values in variables. You use triggers to calculate their body mass index based on those variables. Then you use variable references to display the results.

Variable references can be added to any text-based object, including text boxes, captions, shapes, and buttons. View this user guide to learn more about variable references.

Tip: Quickly replace a variable reference with another variable from the context menu. Right-click a dynamic variable placeholder, scroll to Reference, and select a Project, Built-In, or Slide Numbers variable.

Editing Variables

  1. Click the Manage project variables icon in the Triggers panel.

  2. Select the variable you want to edit and click the Edit icon (looks like pencil and paper) in the upper right corner.

  3. Rename the variable and/or change its default value. (You can't change its type.)
  4. Click OK twice to save your changes and close the Variables window.

Tips for editing variables:

  • You can also rename variables and change their default values just by clicking in the grid.
  • When you rename variables, all references to those variables in your slide text and triggers are updated automatically.

Copying and Pasting Variables

  1. Click the Manage project variables icon in the Triggers panel.
  2. Select the variable(s) you want to duplicate. You can multi-select variables by pressing Ctrl+click, Shift+click, or Ctrl+A.
  3. Click Copy and/or Paste in the upper right corner.

Deleting Variables

  1. Click the Manage project variables icon in the Triggers panel.
  2. Select the variable(s) you want to delete. You can multi-select variables by pressing Ctrl+click, Shift+click, or Ctrl+A.
  3. Click the Delete icon in the upper right corner or press the Delete key on your keyboard.

Tip for deleting variables:

  • When you delete a variable, all references to that variable in your slide text will remain intact. You'll need to edit or delete those references manually.
  • Triggers that involve deleted variables will also remain intact, but they'll become "unassigned." You can either edit or delete those triggers.

Finding Variables in the Variables Window

Because variables are so easy to use and perfect for building interactive courses, your variables manager could quickly become crowded. To find variables in the variables window, use the Project and Built-In tabs in the upper left corner to switch between variables you created and those provided by Storyline 360. And use the search field to locate the exact variable you're looking for.

Finding Variables in Your Course

If you use variables extensively, it can be difficult to remember where they're referenced throughout your course. No problem. You can generate a variable usage report.

  1. Click the Manage project variables icon in the Triggers panel.

  2. Click the hyperlinked number in the Use Count column for the variable you want to find.

Storyline 360 will display all references to that variable in a separate window.

Click the use count for any variable to see all references to that variable throughout your Storyline project

Translating Variables

Storyline 360 has built-in translation features to help you localize content in different languages.

However, it's important to note that the translation features let you translate default values for variables and references to variables in your slide text, but not the names of those variables.

If you translate variable references in your slide text, you'll also need to manually translate the variable names in your project (view Editing Variables). If variable names and references don’t match, variable references in your slide text won't work.

Understanding the Difference Between Variables and States

Variables and states both track information and add interactivity, but they differ in scope and behavior.

States control visual elements for a single slide, while variables control elements across slides, scenes, or an entire project.

Here are some examples of when to use variables and when to use states.

Use variables when you want to:

Use states when you want to:

  • Remember values entered by the learner
  • Count the number of times a button is clicked
  • Perform mathematical calculations
  • Trigger actions based on learner input
  • Remember which objects have been clicked
  • Change how objects look based on learner interaction
  • Trigger actions based on learner interaction