top of page
Search

Mastering Storyline Triggers and Variables: Do You Need a Cheat Sheet?

  • Writer: RT RIVERA
    RT RIVERA
  • Apr 5
  • 3 min read




Basic Triggers

Trigger Type

Action

Common Use Case

Jump to slide

Navigate to a specific slide

After clicking a button or completing a task

Show Layer

Display a layer

Show hints, feedback, or additional content

Hide Layer

Hide a layer

Hide feedback or content after user interaction

Change State of Object

Modify object (e.g., button, image) state (Normal, Visited, Hidden)

Change button color after interaction

Show/Hide Object

Show or hide an object on the slide

Make elements visible/invisible during interactions

Adjust Variable

Modify a variable’s value (e.g., increase a score)

Track quiz progress or interaction states

Execute JavaScript

Run custom JavaScript

For advanced custom behavior outside of Storyline’s native triggers

Play Media

Play a media file (audio/video)

Play an animation or sound when a button is clicked

Pause Media

Pause a media file

Pause background music or video playback

Common Variable Types

Variable Type

Usage

Example

True/False

Track binary states (True = Yes, False = No)

VarIsCompleted = True

Text

Store and manipulate strings of text

VarName = "John"

Number

Store numerical values (e.g., score, count)

VarScore = 10

Object State

Track the state of an object (e.g., Normal, Visited, Hidden)

VarButtonState = "Normal"

Trigger & Variable Equations

Adjusting Variables

Action

Trigger Setup

Example

Increase Variable

Adjust Variable + Add

Adjust variable VarScore by +1 (e.g., increase score by 1 point)

Decrease Variable

Adjust Variable + Subtract

Adjust variable VarScore by -1 (e.g., decrease score by 1 point)

Set Variable to a Value

Adjust Variable + Set

Adjust variable VarScore to 10 (e.g., set score to 10)

Using Conditions with Triggers

Action

Trigger Setup

Example

Check Variable

Add condition to trigger

If variable VarScore is equal to 10

Change Object Based on Variable

Use conditions to modify behavior

If VarIsCompleted = True, Change state of Button to Visited

Manipulating Text Variables

Action

Trigger Setup

Example

Set Text Variable

Set Variable

Set variable VarName to "John"

Append Text

Add text to an existing variable

Set variable VarMessage to VarMessage + "Well done!"

Display Text Variable in a Text Box

Use the value of a text variable in a text field

Insert variable VarName into a text box: "Hello, " + VarName

Quiz Variables & Logic

Action

Trigger Setup

Example

Check Question Answer

Trigger based on quiz results

If Question1 is equal to Correct, adjust variable VarScore by +10

Track Question Responses

Adjust Variable based on quiz answer

If Question1 is equal to Incorrect, set variable VarAttempts to VarAttempts + 1

Trigger Action After Correct/Incorrect

Use question results to trigger actions

If Question1 is Correct, Show Layer “CorrectFeedback”

State Manipulation Using Variables

Action

Trigger Setup

Example

Change State Based on Variable

Change object state (Normal, Visited, Hidden) based on variable values

If VarScore >= 10, Change state of Button1 to Visited

Show/Hide Object Based on Condition

Show or hide object based on variable value

If VarScore > 10, Show Object Image1

Disable Object Based on Condition

Disable interaction if conditions are met

If VarIsCompleted = True, Disable Button1

Navigation Control Using Variables

Action

Trigger Setup

Example

Jump to Slide Based on Variable

Jump to a slide based on variable state

If VarScore >= 10, Jump to Slide 5

Restrict Navigation Based on Condition

Prevent navigation if variable doesn’t meet a certain condition

If VarScore < 10, Show Layer "TryAgain"

Interactive Quiz Examples

  1. Track Correct Answer with Variable:

    • Trigger: Adjust Variable

      • Action: Adjust variable VarCorrectAnswers by +1

      • Condition: If Question1 is Correct

  2. Track User Progress and Show Completion Slide:

    • Trigger: Show Layer

      • Action: Show Layer "Completion"

      • Condition: If VarScore >= 50 (Assuming 50 points is the threshold for completion)

Advanced Equations

Action

Trigger Setup

Example

Conditional Action Based on Multiple Variables

Trigger based on combined conditions

If VarScore >= 10 AND VarIsCompleted = True, Show Layer "CongratulatoryMessage"

Compare Two Variables

Conditional check between two variables

If VarScore > VarMaxScore, Adjust variable VarScore to VarMaxScore

Common Use Cases:

  • Track Progress: Use variables to track how much of the course the learner has completed.

  • Interactive Buttons: Change button state and enable/disable interactions based on learner input.


 
 
 

Comentários


bottom of page