how to reset a number variable to 0


Small problem...hopefully.

I have a number variable that is counting the instances of objects being dropped on a hotspot.

I have set triggers to activate on 2 and 4 and 6.  This works fine.  However if a second user undertakes the training or same user has a second go at  the slide the number variable continues to increment upwards eg 7, 8 9 as more objects are dropped.

I therefore want to reset the number variable to 1 every time it is greater than or equal to 7 and to .

Any ideas guys??

7 Replies
Geert De Rycke

Hi Andrew

Welcome to the community

it is posible to add conditions to triggers and therefore additional logic.

Just look at the example hereafter...


2. Click on the show conditions

3. Click on the green "+" sign

Here you can add your logic, like if my variable = 7 then my variable = 0...

Hope it helps


Dana Carson

Hi Wendy,

Thanks for your suggestion. I tried it , but the variable didn't change when the timeline started upon revisiting. The same score displayed. 

I may not have described the situation clearly.

  • I have a slide with a number variable initially set to 0. When the learner enters the correct information for the first question into an input field and clicks Submit, the variable increases by a 100 points.
  • Clicking the Submit button takes the learner to a slide to learn more information about the answer.
  • The learner is then taken back to the slide with the number variable and when he enters the correct information for the second question and clicks Submit. The number variable increases by another 100 points.
  • After this is done for seven questions, I would like for the score to go back to 0 points just in case the learner desires to answer the questions again.
  • When I initially created it with slide layers, it didn't work. And I thought individual slides would give me the desired effect.
  • I have tried to use a true/false variable on the last slide. Then tried to adjust the number variable based on the true/false variable. But this didn't work.

When you create an "adjust variable" trigger, you are only given the option to add, subtract, or divide but not to reset the number variable (erase the current value it is holding and start back to 0)


Tracy Buthe

Hi Danita,

If I'm understanding things correctly, I think what you'd need to do is create the variable with the =Assignment operator, like it shows below.


Then you'll just set the Value to 0 so it looks like this. I think this is what Dana was getting at. 

Is that what you are looking for? 

Hope this helps.