Forum Discussion

BrianneVarela's avatar
BrianneVarela
Community Member
5 months ago

Disable next button until some states visited

I have created a slide that has 8 options for my learner to choose from. Each option leads to a new scene and when the activities on that scene are complete, the learner is directed back to the "choose your path" slide. Because I want the learners to have a choice in their learning, I would like to only require them to complete 5 of the 8 scenes. Is it possible to disable the next button until any five of the 8 options' states have changed to visited?

  • Yes, that's possible by creating a number variable to track how many of the scenes have been completed. It's important to ensure that that variable only increases once per scene. In other words, you don't want the count to be 2 if the user visits the same scene twice. Here's one way to make it work:

    • Create a number variable with a default value of 0. For example, call it Counter. 
    • Create a T/F variable with a default value of False for each scene
    • At the end of each scene, trigger these actions in this order:
      • Add 1 to Counter with the condition that the associated variable = False.
      • Adjust the associated variable to True.
    • On the "choose your path" slide, use a trigger that changes the Next button to Normal when the timeline starts with the condition that Counter is greater than or equal to 5. Include and "Else" statement that changes the Next button to Disabled.