Resetting Numeric Variables
Jan 07, 2013
Hello all. I have set up a basic scored quiz that uses numeric variables to add and subtract from zero based on answers the learner gives. At the end is a feedback screen that shows the score the learner has achieved.
This all works fine, but if the learner uses the previous screen button to go back and try again, this score is held onto, and subsequent attempts accumulate from the already tallied score. So, they are in a position where they could end up getting 12 out of 6!
I know there are ways around this (e.g. have a "Try Quiz Again" option and the learner thinks they are doing the same quiz, but really it is a series of duplicated slides with a new counter), but I wondered if there was a way to reset the score to 0 (perhaps using a trigger)?
Thanks in advance.
19 Replies
Hi James, there is a Reset Results trigger that will you can place on the first page of the quiz (or on the previous page) that will reset the score to zero.
I don't think this will clear out any type values in the input fields though so you may also have to add a trigger to adjust the variable for the NumberEntry field to zero.
James,
At the beginning of the quiz, you could use a series of triggers to reset the variables back to their starting state. So if, for example, the variable started at 0... you could add this trigger:
This would reset the variable back to 0 and refresh the outcome. You'd do this for each variable you want reset.
Mike
Hi Nancy and Mike
Those are both very helpful suggestions. I shall give them a try.
Many thanks to both of you.![](https://articulate-heroes.s3.amazonaws.com/smiley3yp8t9.png)
Hi Mike and James,
I tried using the trick to reset the variable to their original state but it didnt work. On retry quiz and then question 1, my variable which is the same as "Result.ScorePoints" still shows the score i had reached in my previous attempt.
This is my Object trigger to set my variable (ScoreSoFar) = Results.ScorePoint
..and this is my slide trigger to reset the variable (ScoreSoFar) to zero when the timeline begin
Am I doing something wrong, guys?
Hi Sij
The way I have started to build my quizzes is over two or three slides:
Slide 1: An intro slide that has a 'Start the [Quiz Name]" button with the following trigger applied to it:
Slide 2: The questions presented over a series of layers. Triggers are set up to the answer boxes to assign points depending on the answer selected
In the above trigger, I have set it up to play a sound when the user's feedback is revealed, hence the 'when media completes'.
I'm sure there are probably quicker ways of doing this, but now I have set it up once, I can import it and adapt it for other projects.
I think the difference between how I set it up and how you have is that the learner actually has to press something to activate the resetting of the score. I'm not sure that "Timeline starts" is enough of a trigger to activate that. But that is a complete guess.
Hope that helps you out!
Thank you James!
![](https://articulate-heroes.s3.amazonaws.com/smileyfbdl2f.png)
I see how you've designed your quiz and I guess that method should see you avoid the issue that I'm facing.
I think since I'm using the Storyline Result slide variable "Results.ScorePoints", my variable "ScoreSoFar" is unable to get resetted when my learner retries the quiz.
I did use your advice and removed my trigger from timeline start and moved it to the next button on the previous slide, much in line with your user clicking "Text box 18 - Start at its core" but still, when I reach the first question, the variable "ScoreSoFar" is holding on to the previous score.
Much appreciated, James. I learnt a new quiz method thanks to you!
Any heroes to my rescue?
No problem, Sij. Sorry it wasn't the answer you were looking for in this particular instance. Good luck!
James,
Can you post a picture of your trigger panel (where the adjust trigger is located)? I'm wondering if it's a matter of trigger order. For example, is your jump trigger firing before the adjust variable trigger.
Mike
Hi Mike,
![](https://articulate-heroes.s3.amazonaws.com/1780.11jr1kok.png)
Hope you sort this out for James and me. I would like the "ScoreSoFar" variable to be re-set to zero before learners retry the quiz.
My variable "ScoreSoFar"= Results.ScorePoints.
Hope you can get this fixed..been waiting all day for a solution!![](https://articulate-heroes.s3.amazonaws.com/smileyymi5ey.png)
Sorry, just to flag up, the version I posted above is working absolutely fine for me.
But, yes, the trigger order was definitely a factor in getting it to work correctly.
Hi Sij - I am not sure which screen you have this trigger on, but maybe place it on the slide with the first quiz question and change it to a screen trigger instead of having it on the next button. The change the on click to when "Timeline Starts"
Sij,
Would you be able to post your file (or a simplified, scrubbed version) so that we could problem solve. The way your triggers are set up in those shots...they should work.
Mike
Thanks for offering to help, Mike.
I have scrubbed my unit down to what I need to get reviewed. The Story file has been attached with this post.
In it, you will find:
An instructions slide
Three question slides each worth 10 points
Then a Fail or Pass slide depending on your score
I tested it this morning and still, on retrying the quiz, the variable - ScoreSoFar - is still holding on to the score from the previous attempt.
Thank you very much for your assistance!
Hi Nancy,
I did what you suggested and the trigger pane for my first question now looks like this:
I think your second variable adjustment is changing the score back to the results score. Try changing the second on to trigger when the user clicks the submit button.
Hi Sij, I got this to work and have uploaded a story file to show you how to set up your triggers.
Thanx a ton, Nancy!! Apologies I couldn't post earlier but I managed to solve the problem using your suggestion![](https://articulate-heroes.s3.amazonaws.com/smileydrgfd4.png)
Hi Nancy... I would also like to thank you for the file that youve shared!!! Youre a star! It was a good thing Ive read this thread... I had the same problem since June!!!! Thank you so much!!! It helped me solved my ongoing projects that had the same issue!
Thanks for popping in and letting us know that this thread assisted you as well Ashley :)
This discussion is closed. You can start a new discussion or contact Articulate Support.