How to Use a Storyline Variable to Track If a Slide Is Visited

One of our community members approached me at a recent workshop with a question about tracking visited slides. She explained that she had built a beautiful main menu slide, with a list of lesson titles, each linked to a Storyline scene. Each scene included a few content slides, some quiz slides, and a results slide. This community member asked me how she could make the main menu display a checkmark next to the lesson title only after learners had visited the quiz results slide for that lesson. I explained that this is easily doable using a simple true/false variable and a few triggers in Storyline. Let me show you how.

Create the Slides

Create a new .story project with three blank slides. Name the first slide “Main Menu,” the second slide “Lesson One Content,” and the third slide “Lesson One Quiz.” 

On the first slide (Main Menu), remove the “Next” and “Prev” navigation buttons under the slide properties. Insert a button on the slide with the title “Lesson One” on it. Add a new state to this button called “Completed,” which has a checkmark shape on it. Finally, add a trigger to the button that links to slide 2 (Lesson One Content) when the button is clicked.

img1.PNG

 On slide 2 (Lesson One Content), add text that says “Lesson One.” 

img2.PNG

 On slide 3 (Lesson One Quiz), add text that says “Lesson One Quiz.” Here, you should also update the “Next” trigger to jump to slide 1 (Main Menu) instead of the default next slide option. This is so that when they’re done with the quiz, they return to the main menu.

img3.PNG

Now all your slides are in place. What we want to accomplish is to display the “Completed” state on the button we added to slide 1 (Main Menu) after learners visit the quiz slide. How can we let the Main Menu slide know when slide 3 has been visited? By using a variable! That’s our next step.

Create the Variable

Variables are a powerful feature in Storyline. They allow you to store information (values) that can be retrieved across the course, from any slide. Let’s look at how to use a true/false variable to track if a slide is visited. 

First you’ll need to open up the variables panel by clicking the variable icon (“(x)”) on the triggers panel.

img4.PNG

 This will open a new window, where you will click the “+” icon to create a new variable. We’ll name the variable “LessonOneQuiz_Visited,” then select True/False from the variable type drop-down menu, and then assign its default value to False.

That’s how quick and easy it is to create a variable. But now we need to create the triggers that will make the variable magic happen.

Create Triggers

You’re only going to need two triggers to pull this off. First, head over to slide 3 (Lesson One Quiz). Add a new trigger to the slide that adjusts the “LessonOneQuiz_Visited” variable from False to True when the timeline starts (in other words, as soon as slide 3 is visited). Your trigger should look like this:

img6.PNG

Now, head over to slide 1 (Main Menu). Add a new trigger on this slide that adjusts the state of the Lesson One button to “Completed” when the timeline starts, but add a condition that it only occurs if the “LessonOneQuiz_Visited” variable is equal to True. The trigger should look like this:

img7.PNG

Now you can preview and test your interaction to make sure it’s working as it should. For each additional lesson you want to link to the main menu, simply repeat these steps. That’s how easy it is to track a visited slide using Storyline’s triggers and variables!

Please leave a comment below and tell us about your experience working with variables to track visited slides. And stay tuned to Articulate on Twitter to keep current on all e-learning news and updates!

33 Comments
Dave Cox
MaNaCHa R
Lisa Andrews
Dave Cox

Hi Lisa, Yes, you can, in a way. I assume that you don't have a quiz for this course? The easiest way to do what you want is to just use Storylines built in function to count the number of slides viewed, and send a completion when all of the slides are viewed. I always include a final slide telling the student that the course is complete, and that they can now close their browser window, so I set the count to the number of slides in my presentation minus one. This insures that the completion gets sent correctly to the LMS. This method is very easy, as you just set it in the reporting and tracking settings. You also don't need a results slide for this to work. But yes, you can also do what you are requesting. The way that I would do this would be to add a true/false quiz slide. ... Expand

Dave Cox

Hi Daphne, You can have as many states as you want, up the limit that your PCs memory can handle and the project starts running too slow. I once did a project with 512 states, and it ran OK except response times were very slow. I suggest you take a look at your triggers to see what is firing them, the condition statements that control when you change states, and the current conditions of your variables. One thing that I often do to troubleshoot unexpected results is to add the variables to a text box, so I can see what they are doing as I progress through the conditions. If you need to see the variables on several slides, try adding them to the master slide. You can always remove them later. In your text box, put something like "Variable 1 = %Varable1%, Variable 2 = %Variable2... Expand

Johfra de Kler