Disable next button until states visited

Nov 22, 2016

I need some help.  I have created a course that has multiple buttons that lead to different scenes.  I am trying to disable my next button until all of the states of the buttons have been visited. 

I added a trigger that states the following:  change the state of the next button to Normal when the state of "all of the buttons" is visited. 

I tried adding a trigger that states change the state of the next button to disabled when the timeline start - but after I visited all of the buttons it never enabled. 

Any thoughts?

6 Replies
Walt Hamilton

Not your fault, you have fallen victim to the mythical allure of "When state is".

Try "Change state of next when timeline starts on condition that state of all buttons is visited". It may work for you and if it does, all is well,

I suspect that it may not work, because the visited state state easily gets lost if you are visiting different scenes. To be absolutely sure that it will work, you need to create a variable for each different scene that is set to True when the scene is finished. Then set a trigger to change the state of next to normal when timeline starts on condition that all variables are = True. To ensure that the visited buttons correctly display, I don't use the visited state. I create a custom state with a name like "Completed", and for each button a trigger that changes it to Completed when the timeline starts on condition that the corresponding variable = True.

Set the menu slide to reset to initial state on revisit, so the timeline starts each time. Variables are always stable, and will always work like you want.

Walt Hamilton

Yes, set the initial value of each variable to False.

What makes it true? Use whatever it is at the end of the scene that transfers the user back to the menu, whether that be "Timeline ends", "User clicks next", etc. Create a trigger on the last slide (or layer) of the scene to adjust variable "Scene1Finished" to TRUE when user clicks "I'm Done Here button". Just be sure that the trigger to change the variable is BEFORE the trigger to jump to the menu. Otherwise, SL will jump and forget to change the variable.

Think of the variable as passing a note to the menu slide, so it knows what you have done while you are gone from it.

On the menu slide, set a trigger to "Change state of NEXT button to disabled when timeline starts".  Then AFTER that trigger, one to "Change state of NEXT button to normal when timeline starts if variable "Scene1Finished" = TRUE ( and Scene2Finished = TRUE, etc.)

I also set a trigger to "Change state of Scene1 button to Completed when timeline starts if variable "Scene1Finished" = TRUE, and and equivalent for each scene, so there is visual evidence of scenes visited.

Check the attached story. It jumps to different slides rather than different scenes, and uses a custom NEXT button, but all the principles are the same.

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