Problem controlling the state of a button based on quiz results
Mar 27, 2019
I'm having problems controlling the state of a button via some variables and triggers.
We have a "Click here to continue" button on the results page that should appear if you get a perfect score. It should be hidden if you get anything less than a perfect score. You get one shot at each question, but you can repeat the full quiz as many times as you want.
It works fine if you get a perfect score the first time through.
But, if you mess up, and repeat the quiz, and then get a perfect the second time through, the "Click here to continue" button does not appear like it should.
The button has 3 triggers:
1) A link to the next slide
2) Change the state to Hidden if the score is not equal to a perfect score (a variable that I set to the number of questions of the module. For this example I set it to 1)
3) Change the state to Normal, if the score is equal to a perfect score.
Hopefully I am just missing something obvious. Any ideas?
I'm uploading a stripped down version that shows the problematic behavior.
Oh, btw, I am using Storyline 3.
Thanks!
6 Replies
Hi Fritz! I made 2 small changes to get this setup to work:
Because the Continue button's initial state is Normal, resetting the results slide to the initial state will return that button to the Normal state. The only trigger to change the state of that button will be to hide it if the perfect score is not achieved. I also added a variable reference to make sure I could see the score changing when retaking the quiz.
Check out your attached modified file, and let me know if that works for you!
ah ha! Setting the results slide "reset to initial state" seems to have done the trick!
I had set the quiz question slides to that setting but it didnt occur to me to do the same for the results slide.
Thanks so much!
Do you have any idea why changing that setting is necessary? I don't quite follow the logic for that?
Hi Fritz,
That setting allows everything to reset on the additional attempts so that the slide can work based on the triggers you set up. Glad Crystal was able to assist you with that!
I get the general idea, but, without that setting, it seems that my now unnecessary trigger to set the state to normal when a perfect score was achieved should have worked. But it didn't and I can't figure out why?
Hi Fritz,
The "Normal" state can be a weird one as it's the neutral state for an object and often it's not one I'd recommend using a trigger to adjust as you run into challenges like this. Instead, you could always look at using a custom state for your object and trigger to that.
In case you haven't seen it yet, I also wanted to point out that this article here describes the definitions and behaviors for each of the states.
Thanks, that's good to know about triggering to Normal, I had no clue that that was problematic.
I'll take your word for it that it's a weird one, although I'm not sure what "neutral" means in this context? Seems like it means it's the state that the object is in if an event or trigger has not caused it to change? Why would that make it behave weirdly? The mind boggles, the mind boggles...
This discussion is closed. You can start a new discussion or contact Articulate Support.