Forum Discussion

JeanMarrapodi-e's avatar
JeanMarrapodi-e
Community Member
3 years ago

Change state of a button after trigger is fired

I am trying to get a set of buttons to go from visited to completed.

I have a main slide with a bunch of buttons that jump to difference scenes. These are the ones that aren't changing.

Each button jumps to a scene that has two parts: View and Practice. At the end of each segment, a variable changes from false to true, ie ViewComplete and PracticeComplete. That is working fine, so the scene dashboard won't let them move on until they have completed both parts.

I have variables in the main dashboard to change the state of the button to completed if the variables set in the scene are true and the state of the button is visited, which I think automatically happens when the button is clicked. But the buttons stay at visited.

What am I missing?

Here are the variables.

 

Thanks for any insights!

  • I assume you are leaving the dashboard slide to go to a slide to set the variable. And then you are returning the dashboard.

    If that's the case, the trigger should be to change the state of the button to complete when the timeline of the slide starts on the condition that var = X and state = visited.

    See if that works.

    • JeanMarrapodi-e's avatar
      JeanMarrapodi-e
      Community Member

      Thanks Tom.

      Yes, they leave the dashboard and do the activities in the scene. It's at the end of those that the variable switches.

      I've got it the way you suggested as the setup for COP variable in my last screen shot and nada.

  • There are sooo many things that could cause this, it is foolish to guess without being able to look at everything. (For example, what initiates the triggers in the last picture?)

    Nevertheless, I will suggest that you don't need the condition to find the button in the visited state and the variables set to true. The way you describe it, you want the variables to be set true only under the circumstances of the learner clicking the dashboard icon and completing the actions.So if there is any method for them to get to the View and Practice besides clicking the dashboard icon, take it out. If the variables are True, the icon has been clicked.

    If that doesn't help, click Add Attachment, and attach your .story file.

  • I'm with Walt and would scrap evaluating the visited state. If you can't get it to work. You can duplicate the file, take out any proprietary info and extra slides and share the file so we can look at it.

  • You are on the right track, except for a couple of small things.

    One is these triggers:

    Once the system encounters a "Jump" trigger, it jumps, cutting off the execution of any trigger below it in the list. So the variable will never be set until you move it above the Jump trigger.

    The other problem is on the main dashboard. I found triggers like this:

    for all the options except COP. Add it, and change the order of the others, and I think you'll be all right.

  • MY HERO!!!!!! That did it. I didn't know about the order of triggers and jump. Is there a list somewhere of the priority order they have?

    Thanks so much, Walt and Tom.

  • You're welcome. PIAWYC  (Pass it along when you can). 
     
    The only priority triggers have is that they are executed in the order they appear. So to troubleshoot them, you start with the first one on the list and ask "What does it do? Now what has changed , what is the situation (states, variables)? Now in that new situation, what does the second one do?" Unless they have conditions that keep them from executing (or a jump to break the chain), they all execute in order, from top to bottom.
    • TomKuhlmann's avatar
      TomKuhlmann
      Staff

      Glad you got it resolved. Thanks for stepping in and helping, Walt. Hope you both have a great weekend.