Forum Discussion

miri_dash's avatar
miri_dash
Community Member
4 days ago

Button won't change state

I assigned variables to the layers I want to track. Then, I created a trigger that would change the button state to Normal once all the layers have been visited. But it still won't change. 

What did I do wrong here?

  • The trigger to change the button to Normal runs when the timeline starts.

    That trigger runs when the user first visits the slide. But by the time the user views the layers and the variables change to True, the slide's timeline is already done.

    You need to use a trigger that will run after the variables change. For example, put a trigger on each layer with the same conditions, and have it run when the layer's timeline ends. 

  • You did well to set the variables when the learner is finished with the layer, rather than when it begins. If you change it at the beginning, they can move on without finishing the layer.

    The question now is, what action on the base changes the button to Normal?

    There needs to be something happen that will initiate the trigger that changes the state.

    I generally connect it to the ScenarioBttnX_Done. If they must visit the layers in order, you can use it just on Scenario3. If you are allowing them to visit the layers at random, then you need one on each layer.  It looks like “Change state of Button to Normal when user clicks ScenarioBttnX_Done if AliceVisited =  True AND KarlVisited = True AND TiffanyVisited = True”.  Be sure to put it in the list after the trigger that changes the variable.

  • The trigger to change the button to Normal runs when the timeline starts.

    That trigger runs when the user first visits the slide. But by the time the user views the layers and the variables change to True, the slide's timeline is already done.

    You need to use a trigger that will run after the variables change. For example, put a trigger on each layer with the same conditions, and have it run when the layer's timeline ends. 

    • miri_dash's avatar
      miri_dash
      Community Member

      Thank you so much! I'm still new to developing lessons using Storyline 360. You're explanation helped me understand how this scene is running. 

      • JudyNollet's avatar
        JudyNollet
        Super Hero

        I'm glad my reply helped. 

        FYI: Triggers run in order. So if you use the method I described, be sure to put the "change state of Next" trigger after the trigger that adjusts the layer's variable to True.

  • miri_dash's avatar
    miri_dash
    Community Member
    • Did you leave the default values of the variables as "False"? Yes
      • Did you set triggers on each of the layers to set the respective variables to "True" as the timeline starts on each layer? These are the triggers I set for each layer.

      Hope this helps, and thank you for responding!

  • Hi Miri,

    We need some more screenshots to see how you programmed the layers.

    • Did you leave the default values of the variables as "False"?
    • Did you set triggers on each of the layers to set the respective variables to "True" as the timeline starts on each layer?