Forum Discussion
KatParker
2 years agoCommunity Member
Show Attempts Left
Hi,
I've got a 10 question quiz, and the user has 5 attempts total to pass with an 80% score.
- I have Attempts set to 0 because I have feedback set to none
- I have a variable called Attemptsleft which has a default value of 4
- On my Results screen, I have a Retry Quiz button, and a Review Quiz button.
- I want Attemptsleft to reduce by 1 every time the user clicks Retry Quiz
- I have a layer trigger on the Failure layer that says:
- When the timeline starts on this layer
- set state of Button 2 - "Retry Quiz" to disabled
- if attemptsleft = value 0
- set state of Button 2 - "Retry Quiz" to disabled
- When the timeline starts on this layer
- I have a box on my Failure layer on the Results slide that has a variable reference that shows Attempts Left to the user
- The triggers on the Retry button are as follows:
- When user clicks Button 2
- Reset results 1.18 Quiz Results
- if attemptsleft > value 0
- Jump to slide 1.8 question 1
- if attemptsleft > value 0
- Subtract value 1 to attemptsleft
- Reset results 1.18 Quiz Results
- When user clicks Button 2
The only thing is, Attempts Left doesn't show a count down, it just shows the number 4 no matter how many attempts the user goes through.
Can someone help?
Thanks!
- JudyNolletSuper Hero
The trigger to subtract from attemptsLeft is after the trigger that jumps to the question slide. A trigger can't run if the program has already left the slide. Just move the trigger up, and it'll work.
- KatParkerCommunity Member
You're a hero!! Thank you!!!