Reset Variable Points

Apr 18, 2016

Hi guys! I created a 5 question quiz. Each response is worth a total of 0-2 points and I have this set with the variable "total score". The first time through the game everything works beautifully. The scores add correctly, and the results slide shows the appropriate result based on the total score. If the learner fails the quiz, I added a button for them to retake it, but when they click replay, the score from the first time through does not erase. How can I set the game so that when the learner goes through it a second time, the score starts from 0 again? I set my slides all to reset to initial state thinking that would solve the problem but it didn't. Is there a trigger I can add to these slides to tell them to restart the point for variable "totalscore" to 0 if the learner replays?

3 Replies
Annaliza Guanco

Hi Madeline. You need to add a trigger to the Replay button so that when the user clicks on that object, the value of 'total score' variable is reset to 0.  From the trigger wizard window, choose the below and hope it works.

Action: Adjust Variable

Variable: TotalScore

Operation: Assignment

Value: value - 0

When: user clicks

Object: Replay

Madeline F

Thank you. Unfortunately I originally thought this worked, but it doesn't change and the score doesn't reset. I have it set at "0" but I notice your trigger says "-0". How do I set it at "-0"? This may be a weird question but when I type a negative sign before the 0 it just disappears.... and regardless the score still does not reset.

This discussion is closed. You can start a new discussion or contact Articulate Support.