How to reset all variables during development?
Jul 22, 2015
By
Mark Swanson
I'm trying to customize a "Try it" simulation by using an "attempts" variable for tracking attempts. (If user clicks Try Again dialog 2 times, show a "Let's move on, click Continue" type dialog and move on to the next slide.) I can't get it to work and I wonder if it's because the "attempts" variable Use Count keeps incrementing each time I touch the Try Again layer. Even if I quit Storyline, the Use Count (e.g., attempts = 4 uses) persists when I re-open the project.
How do I reset all scene variables to "0" to troubleshoot this project?
9 Replies
On the first slide of a scene, you could add slide trigger(s) that reset the variable(s). For troubleshooting, you could add a textbox to the master slide with a reference to that variable. That would shows you the varibale value as you navigate through slides and scenes.
I should have added that I tried that trick ("Set attempts = to 0.00 when timeline starts"). Didn't work.
Can you share your .story file here so that we can have a closer look?
Before I do that... I got the variable to reset on timeline start. But how do I get the "Let's move on" dialog to display instead of the "Try Again" dialog? Basically I want the feedback functionality of the "Test" simulation mode for my "Try" simulation. Would it be simpler to use the Test style and just add hint dialogs as needed?
I guess you could display the Let's Continue dialog, based on the variable value. Something like, Show layer Continue, if variable xyz=2.
Yes, that's what I've tried to do. But the Try Again dialog keeps asserting itself even after variable xyz=2. The Let's Continue dialog never appears when the conditions are met. I've tried adding another trigger to the Try Again layer to hide it when xzy=2. Doesn't work.
I know it's hard to troubleshoot what I'm doing without the file, but do you have any tips?
One thing you could check is the order of triggers. Remember, triggers are executed top-to-bottom and sometimes an out-of-order trigger can lead to unexpected results.
Okay, I had the Let's Continue trigger attached to the layer, so I moved the trigger to the slide trigger area where I could control its order. This works -- sort of. The problem is that the Let's Continue trigger (show layer if xyz=2) depends on the variable being incremented when the user clicking the Try Again button, so when the user clicks Try Again for the second time he/she is immediately shown the Let's Continue. How do I get the Let's Continue dialog to display after the second attempt instead of displaying the Try Again dialog (i.e., the functionality of the "Test" simulation mode)?
It's odd that variable values would persist, even after closing the authoring tool. Normally when I preview a project I can close the preview, then relaunch the preview and all of my variables have reset.
This discussion is closed. You can start a new discussion or contact Articulate Support.