Forum Discussion
Change State of Button When Pass Test
- 12 days ago
Your trigger on 1.1 that tries to change the state of the Play Button to Visited fires when the .ScorePercent variable changes, but the trigger is only "listening" for that on the slide the trigger's hosted on. When the learner navigates to 2.1 and 2.2, the Score might change but that state-change trigger is no longer active because we're no longer on the slide where it lives.
Then when the learner returns to 1.1 after scoring 100%, the slide (re)loads and the trigger becomes active again, but the Score variable doesn't change after 1.1 loads so the trigger doesn't fire and the state doesn't change. If you change the trigger to
Then the trigger will check the value every time the slide loads, and returning with a score of 100 will then be checked and confirmed.
Perhaps the image I attached to my prior comment didn't load for you? If the Action of the trigger is "Set state of [object] to Visited" then the Event is "When the timeline starts," not when a variable changes. You can't trigger the button state to change to Visited while you're on a separate slide.
The 1.1 button state can only be updated once the learner returns to the slide the button lives on, which is why the "When the timeline starts on this slide" trigger has to run on 1.1. When the learner passes the quiz and is sitting on the results page (where the .ScorePercent variable I think truly changes), slide 1.1 isn't being calculated or rendered so I don't think there technically is a button to change the state of. Only once the learner returns to 1.1 will the browser redraw slide 1.1 and its buttons and then run the trigger to change the state.
You are a genius. I changed it to "When time line starts" and it WORKED! I knew there was a flaw in my original logic. Thank you thank you thank you thank you so much!
- AndrewBlemings-10 days agoCommunity Member
Happy to help! The slides have a particular way of working that I think just takes time to become familiar with. Best of luck
Related Content
- 1 year ago
- 9 months ago
- 5 months ago