How to program buttons so that....

In this SL1 .story project, the learner has to proceed in linear sequence first time through the course. And then learner should be able--once all Scenes have been completed but prior to starting the Test--to revisit any Scene in any order. How can I program these buttons to make this work? I assume it has to do with some [x] variable changing, yes?

Any suggestions appreciated!


37 Replies
Wendy Farmer

Hi Joseph

yes, you could create a True/False variable that is triggered when the timeline starts on the last slide of Lesson 4. Then set the Menu available when the user returns to that main screen by adding a trigger to show navigation (or whatever it is that you want available) when timeline starts on condition  variable is set to true.

Hope that makes sense

Jason Reed

Sounds good Wendy. I would do the same thing.

Joseph, you'll need to do a few things.

Create your true/false variable, set to False as default. I'll call it Variable x for now.
Then on the last slide of a section, create a trigger that says: Adjust variable > Variable x > Change value > True.

Your menu buttons will all need to be set to disabled (unavailable) to start with. You'll also need a trigger that says to change the state of your menu button to normal (available) when Variable x is true.

Finally, you'll need a trigger to change the state of the button to In Use when you're in the section ie. Lesson 1.

Hope that helps clarify.

Jason Reed

Hi Joseph,

Yes, I the functionality will work on your custom buttons.

Once you've triggered the variable to true, which changes the state of the button, it should stay as active and available when you revisit. As long as there are no triggers that change the variable back to false, the buttons shouldn't ever be disabled once you've unlocked them.

Does that make sense?

Joseph Roberson

Yes, Leslie, great attempts to help. Unfortunately, this feels like one of those math problems I get flummoxed by due to some missing piece in my comprehension. I sent a request to tech support because I am not allowed to post this file in public. 

I have created the variables: Lesson1completed; Lesson2completed; Lesson3completed; Lesson4completed.

I created a trigger at the end of Lesson 1 (Scene 2) so that when a hotspot is clicked, the variable gets changed from False to True.

Back in Scene 1/slide2, I created a trigger on Lesson2button to change state to Normal if Lesson2completed variable is True. That button's initial state is set to Hidden.

When I test it out by previewing entire project, going to the end of Lesson 1,  and by clicking that hotspot, it does not result in Lesson2button changing from Hidden to Normal when I go back to Scene1/slide2.

I went back and made sure the triggers were above any other trigger.

Now, I'm back to flummoxed state.

Walt Hamilton
Joseph Roberson

Back in Scene 1/slide2, I created a trigger on Lesson2button to change state to Normal if Lesson2completed variable is True. That button's initial state is set to Hidden.


What is really important is the When for this trigger. It has to be set to an action that happens that the trigger can see. I suggest When timeline starts.

Walt Hamilton

When variable changes

On Scene1/Slide2, the user clicks and changes the variable. The user returns to Scene1/Slide1 and the scripts start running. But the variable never changes WHILE THESE TRIGGERS ARE ACTIVE, so when variable changes is an example of a trigger not seeing an action.

What is the When on your trigger?

Joseph Roberson

The WHEN of Trigger "Change state of Lesson 2 button to Normal" = beginning of timeline on Scene 1, Slide 2.

The WHEN of the variable "Lesson1Completed" being changed = beginning of timeline on Scene 2, Slide 8 (final slide of Lesson 1).

Do I understand correctly that no conflict is possible unless Trigger and corresponding variable  are on the same slide? Only when they are on same slide do I have to be careful to maintain this separation?

Joseph Roberson

Different question?

I have been operating under the assumption that buttons cannot be created on–nor controlled by– Masters or Layouts. I have been copying/pasting my custom nav button set onto each individual content slide. This necessitates programming every slide's buttons separately, which is a tedious chore.

Recently, however, I came upon a thread that contradicted this assumption.

Question = Can any or all of these elements–buttons, variables, triggers–be created and/or controlled on a Master? What are best practices when creating a custom button set for navigation?

Hopefully I can simplify this build by moving at least some of these elements to Masters.

P.S., Is it possible to set the Player to Locked initially but unlock it once the learner has gone through the entire course and has taken the final Test at the end?

P.s.s., I'm using Storyline 1.
Joseph Roberson


Joseph Roberson

If a variable is like a whiteboard, how can I be sure it does not get erased when learner exits the  course? What do I have to do to make sure the variable remembers that learner completed Scene 2 (Lesson 1) and therefore "Lesson 2" button is Normal when course re-launches, when learner resumes and takes up where she left off?

Ashley Terwilliger

Hi Joseph,

A few different things here - so I'll try to hit them all. 

First, triggers that may not work on a particular slide is something like "when variable changes" - the variable needs to change on that particular if you were adjusting the variable somewhere else, that trigger won't execute.

Master slides can have buttons and triggers attached to them and used on layers as well. How you set that up is likely the issue you're running into - as the trigger will have to be the same for every slide using that master. So for example if it's a regular navigation button and it's "jump to next slide" that's ok. If you need to say "jump to X slide" that would have to be set up on the individual slides. 

If you're using the "resume saved state" the user will be brought back to where they were in the course and any variables or slide states would remain - for slides the user has previously seen. If they leave mid slide, they'll be brought back to the start of that slide and pick up from there. 

Hope that helps!