Resetting variables on each slide
Apr 15, 2019
By
Karyn Jones
Hi, community! I am giving this weeks challenge a crack and have hit a snag.
I have 5 slides with a spot the difference on each slide. The user has 10 attempts to find the difference. I have set up a variable to count the clicks.
Where I am struggling is, how do I reset the click/attempt variable so that that clicks don't carry over on to the following slide. At the moment if you take say 6 clicks on slide one, you are getting the incorrect layer on slide 2 after 4 clicks.
Thank you in advance!
3 Replies
Hi, Matthew! Thanks for replying!
I tried that, but it didn't work. I have attached the story file (I haven't completed the design yet so please excuse the roughness of it!) to show you what I have so far.
Many thanks again for your help!
Hi Karyn,
Matthew's solution is the right one. All you need to do is to add a trigger at the start of each slide that resents Clicks to zero when the timeline starts for that slide:
Just make sure that the Object you have selected is the slide name as in "1.6 Umbrella Slide" above.
Thank you Ned and Matt!
I realised what I had also done wrong - I still had show the bad luck layer if clicks were greater than 4, not 10. It all works perfectly now!
Thanks again, have a great day!
This discussion is closed. You can start a new discussion or contact Articulate Support.