Unable to Set Variable Back to Zero

I've created three drag and drop  freeform slides.  On each, I've increased an Overall Score variable (add 1) each time the user selects the correct items, and reduces the Overall Score variable (subtract 1) when the user selects incorrect items.  It works! 

Now here's the trouble: I have a custom results slide.  On that slide I have three layers that relate to the scores earned.  On each layer, I offer the user a chance to retake the assessment by clicking a button.  I set two triggers on these buttons: One takes the user back to the first drag and drop slide.  The second sets the Overall Score variable to zero.  However when the user replays through the three slides again, the variable simply keeps increasing in value, never resetting to zero.

Any thoughts?

12 Replies
Wendy Farmer

Trigger order comes immediately to mind.

SL executes the triggers in order they are displayed - so if you are retaking the slide (jump to...trigger) and the variable to reset to zero is under that jump to slide it will never execute.

If that's not the issue, can you share the slide and that will let people see the setup and offer a solution.

Ned Whiteley

Hi Jeannine,

The first thought that comes to mind is the order of your triggers. If you are sending the user back to the first drag and drop slide before you reset the variable then the variable will never be reset, as the results slide will have lost focus before that trigger can be activated. It is therefore essential to ensure your reset trigger comes above the trigger that sends the user back to the drag and drop slide. The way you have worded your post above suggests that it is currently the wrong way round.

Hope this helps.

Jeannine Reilly

First- I have to tell you how impressive these forums are!  Love the responsiveness!  I was super excited to hear the thought about having the triggers in the correct order, as mine weren't.  Unfortunately it didn't fix the problem.  I even tried putting a "reset the variable to zero" trigger at the start of the timeline of the first slide, and still isn't working.  

The slides are attached - help!  :-)

Wendy Farmer
Jeannine Reilly

However when the user replays through the three slides again, the variable simply keeps increasing in value, never resetting to zero.

Hi Jeannine

I'm not seeing that behaviour

I add the variable reference to all slides including the feedback layers so I can see it changing...See this Peek video - when I retry and go back to the first DnD slide the variable = 0

I've run through it a few times making different selections each time and it's working as I expect.

Sorry I can't be more help but I can't replicate the issue where the variable isn't returning to zero and I tested landing on each of the three feedback layers.

Jeannine Reilly

Ok...so it's not that the Overall Score isn't resetting.  As you point out, it is.  But what is NOT happening is the results screen layers changing appropriately.  When a score of 2 or lower is earned, the two or less score layer is to appear.  If a score of 3 or 4 is earned, that layer should appear, and it a score of 5 or 6 is earned that layer should appear.  

What is happening is the correct layer appears the first go-round, but not the subsequent ones.  :-/

Attached is a screenshot of the button triggers that should result in the correct layers showing.

Ned Whiteley

Hi Jeannine,

I think you will find that the problem lies in the Slide Properties for your Results Slide. Currently the "When Revisiting" option is set to Automatically Decide, which is the default setting. If you set this to Reset to Initial State, which will force everything on the slide to be reset as if you had never visited it before, I think you will find that your quiz results are now correct. I have run a quick check and it appears to be running the way I think you want it to.