Need help with variables

Jan 16, 2015

I have a main homepage with 5 links on it. When the user clicks that link, they are taken to another scene. (Link 1- take user to link 1 scene to view content). I want to make a checkmark beside the link button on the main homepage once the user has viewed ALL content under that scene. But I know I need a variable of some sort to do that. Any help at all is appreciated. I'm new to Storyline.


7 Replies
Brett Rockwood

Hi Jodi. This isn't that hard to do; you need a few variables and states to do it.

First create a visited state for your menu buttons with a check marks for each. Then create a True/False variable for each scene with the defaults as False. Next go to the last slide of each scene and set a trigger on the Next button (or any button you want that returns the user to the menu) to change the corresponding variable to True. Finally go back to your menu slide and set triggers that change the state of your menu buttons to visited "when the timeline begins" if the corresponding variable is True.

Does this make sense to you?


Brett Rockwood

Emily, that's true but that only shows that the person "went" to a section not that they "completed" it. To show that they completed/finished a section I believe you'll need to use a varible on the last slide of each section.

It's true that you can use the built in Visited state but they don't come with the checkmark (if I remember... I don't have SL open at the moment.).

Emily Ruby

Hello Brett!

You can add any pictures, shapes, etc to the visited state. I added a checkmark into my example just for the visual.  As far as using a trigger or variable, this would only be needed when using a custom state. I guess it would depend on how the content in each scene, and how it is set up. If they have to go through all of the content before getting back to the main scene, then the built in would work. But if the course is under a free navigation, then it could be a little tricky. 

Jodi, do you have a file you could share?

Walt Hamilton

My experience is that the built-in visited state is not reliable if the viewer needs to view several slides in the new location, and does not work at all if the viewer navigates to a third location, then comes back and finishes the segment before returning to the navigation location.

Brett is right, if you want reliability, you need to make a custom state, and change the variable after the timeline ends on the last slide.

Jodi Albarano

Hi all,

Thanks for the help. I am still having issues. My issue is that it's a free navigation thing. The user can click on Link 1, Link 2, etc, at any point during the course. They are available throughout the entire thing.

I'll use main link 1 as an example. When I click on Link 1 from my homepage, it takes me to the LInk 1 scene (Which is 1 slide only - -same for all 5 scenes they are all 1 slide) which also includes all 5 main link buttons at the bottom.  Once in scene 1,  I can then click on 3 additional buttons that show 3 different layers.  I've created the variable "Slide1Complete". and set it to false when the timeline starts. I've also created "visited" states for each of these 3 buttons within the scene so that I can assign the Main Link button as "visited" once all three of the buttons on the slide are also "visited".  Then I set the variable Slide1Complete to true once it checks if the MainLink 1 button is visited. Once I've clicked on all 3 buttons under that scene, I want the main link button to note a "checkmark which I've created in the visited state of each main menu link. To note to the user that Main Link 1 is done. (This part works) but the checkmark won't stay there when I then navigate to main link 2, 3, etc

I have some of the triggers on a button and some on a slide though so I'm not sure what I need to put the trigger on.  Also, does it matter the order of the triggers? I've read that it does.

I'm attaching the file. I cannot figure it out.

Any help is appreciated.

Emily Ruby

Hello Jodi!

Thank you for sharing your file. Since you have a link to each scene from each slide, this will need to be set up with a few extra triggers and variables, and you will need to use a custom "visited" state. I updated link one and two only. You have a built in hover state, which will not require the trigger to hover, this will happen automatically, so I have removed those. Also your Link 1A, Link 1B etc all have a built in visited state which will not require the triggers either. You only need to add triggers for custom made states.

I added a custom state to the links (customvisited) so that they only show when the layers are all visited. Also the variable Slide1Complete, etc,  is default to False, so you do not need the trigger to set this as false when the timeline starts. You will need to trigger that to adjust to true when all the layerlinks are Visited.

Also, on each scene, you will need a trigger to change each of the Link1, link2, etc, to change to customvisited on timeline start if their variable (slide1complete, slide2complete etc) is set at true. This way they will update on the home page, and each scene.

Attached is a file, again, I only updated Link1 and Link2. Hope this helps

This discussion is closed. You can start a new discussion or contact Articulate Support.