How to use a true/false variable to track whether a certain event has occurred, then let learners proceed to the next slide only when the variable is true.

Jul 10, 2015

Hello,

I'm trying to have the "NEXT" button become normal when the Learner clicks on all 4 buttons. They should have to click on each button before the "NEXT" button becomes active for them to proceed. Can someone please refer me to a tutorial or offer some advice on how to get this functioning working correctly? I don't seem to understand how the true/false variable works. Thanks for any help I can get. I have attached the project. Each slide layer contains audio and will contain images and text but I haven't gotten that far. I wanted to get the functionality working first.

19 Replies
Michael Hinze

Have a look at the attached file and see if that's  what you want. I added a T/F variabe that is set to True when all four ? buttons are Visited and the media on each layer completed playing. based on this changing variable, I 'turn on' the Next button and display the hint caption (which I moved to the baselayer). Hope that makes sense.

Omar Garces

Thanks Michael,

I went ahead and used your slide as a template for another in the same course that I'm building and I have run into a problem which I can't figure out.

The first slide works great but than when you click "NEXT" and it lands on the next set of clickables, the variable is automatically set to "TRUE" so when the Learner clicks on the 4 questions and listens to the answers, the "Click NEXT" nor the "NEXT" button become active due to the slide already thinking it's 'True.' 

How can I set up the second slide so that it doesn't automatically think that it's true?

Thank you for any help that you can provide.

Omar Garces

Hi Ashley,

Thank you for your response. I went ahead and created a new variable but it's still not working. The slide still thinks it's 'True' even after I created the new variable.

I have enclosed the slides for you to take a look at, if you're so kind to.

Thank you,

Wendy Farmer

Hi Omar

variables are used globally in SL not on a slide by slide basis.  So if you start with a T/F variable that has a default of 'False' and you trigger it to True on say Slide 2 - it will remain in that True state for the rest of the project even if you 'reset the slide to initial state' when revisited.  You have to trigger the variable back to false for it to be used again - hence Ashley's comment above to reset the variable.

On your first slide, I created a trigger, Adjust variable 'complete' to value 'true' when state of all 'your four ? marks are visited'. This changes the variable to true and the next button to enabled.

On your second slide I created a trigger, Adjust variable 'complete' to value 'false' when the timeline starts on Slide 2...this way your variable is ready for the next set of instructions to turn it to true on slide 2.  

Always be careful of your trigger order as well.

See attached if this helps you

Ashley Terwilliger-Pollard

Hi Lucy,

If you're using the variable on a master slide, it would be resetting any slides that are using that master so it could become problematic. 

Adding a trigger or similar to a master slide shouldn't automatically create a new slide master layer for you - so I'd also want to confirm that you're working on local project files as described here. 

Lucy Thomson

Hi Ashley

I realised I had copied/pasted the trigger from a slide to the master which appears to be what was causing the new layer to appear - when I created it directly it worked beautifully. However, as you suggested, my logic was flawed and it *did* create a problem so I've done the variable reset on each slide instead.

Thanks for the help!

Lucy

Walt Hamilton

You need a separate variable for each slide (in addition to "Complete") to indicate if this is the first visit to the slide. For example "Slide1Visited". When "Complete" is set to True, also set "Slide1Visited" to True.

Then add the condition "If Slide1Visited is equal to False" to the trigger that hides the Next button when the slide opens. When you return to the slide, the Next button will not be hidden.

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