Trigger to Initialise/Reset ALL Variables in Storyline 360
Sep 11, 2018
I've been building an interaction today that uses a lot of variables. There's a point in the interaction where the learner has the chance to reset everything and I've had to add a LOT of triggers to reset the variables.
With this in mind I came up with a new feature request. It would be great if there was a trigger to reset either all developer-created project variables (obviously excluding Storyline's system variables) and/or have a check list of variables used in the project where a developer can specify which variables they want to reset via a trigger, i.e. reset variable X, Y & Z when button clicked, timeline starts etc. I believe this would save developers a lot of time and would help keep this element of a build clean.
I've requested the new feature here, if anyone else likes the sound of this I encourage you to do the same thing.
58 Replies
I support this request as well!
I support this feature request; particularly the ability to select a subset of project variables to be reset!
In a project just updated from Storyline 2 to 360, I was using JavaScript to reset all of the variables to "False". There are interactions that Toggle the variables when the user clicks (single) to either show an X (when True) or hide an X (when False). However, after the variables were reset using JavaScript it required users to double click to change the variable to True and display the X.
[View Project Using JavaScript to Change Variables]
I did not observe the same issue when using the built-in options of the "trigger builder"; if I made a trigger for each variable to change the value to "False" when the timeline starts it only required a single click.
[View Project Using Built-in Options to Make Triggers to Change Variables]
I tried using both lowercase "false" and uppercase "False"; both had the same result.
It seems like Storyline is not treating the "False" values in the JavaScript the same as the "False" values used in the built-in triggers. Has anyone run into a similar issue when using JavaScript to reset variables; do you have any suggestions to resolve the issue?
My vote for this feature as well. I assumed "restart course" would do it and it did not. What does "restart course" do?
I was just looking for a way to reset all variables, as I have a set of courses where the user has the option before taking the quiz of starting the module over. I have chosen "revert to initial state" but really need to reset all the variables... or have the option to choose which variables to reset or not reset would be even better.
Any progress made on this request in the past few months?
Hi Robert,
Thanks for chiming in and add your plus one as well! This feature hasn't made it to the top of our roadmap, but we're still tracking requests and sharing any helpful insight with our team!
Here's a bit more about how we work to prioritize feature requests.
Restart course is supposed to reset your custom variables, reset slide states and send the user back to the beginning of the course. It does not re-lock/re-restrict the menu or reset any of the built-in variables, as one might expect.
I also support this request, as we create various games where we'd like learners to restart without exiting/relaunching the content on the LMS, and hopefully without having to manually reset tons of variables at the end. In addition, we often have slides with "Resume saved state" ticked...but these would need to be reset once learners reach the end. I don't know if some kind of trigger could exist for this as well. Reset all variables + Reset all slides!
In this example, learners jump back to the main game slide, and not from the very beginning of content,
I would welcome this development. I have produced 2 IT Training applications, each with 150+ text fields. When revisiting a page, the variable is being retained. Ideally, I would reset ALL the variables each time the learner returns to the Main Menu.
I support this request as well.
Almost 3 years ago the request was submitted for this feature by David... Is it any closer to being a reality?? It is definitely needed.
Couldn't it be implemented in a similar way to the selection of graphic elements? Where the user can select specific variables to clear... rather than clearing all of them.
Yes! I support this request. Hope this can be implemented very soon
i use 2 solutions to tackle this.
1) when setting a variable, also add it to an array. So when resetting i loop the array an set all to false, null, blank or 0.
2) name all variables as v_str_somename , v_num_ or v_bool_.. now you can loop all vars and reset them depending on string, number or boolean.
That is what brought me to this thread as well!
I am looking for a solution to reset all of my variables as well. I read on another thread that due to the differences in how Storyline and JavaScript deal with Boolean variables ( JS returns a string), a Javascript solution would not work to reset these variables. Did I misread the other thread?
You should be able to set a Boolean value in JS just be aware they are case sensitive
Sent from my iPhone
This feature would be fantastically useful!
Although there indeed is a difference in Booleans between Storyline and Javascript. SL writes and reads them as False, whereas in JS you write/read them as false. This is no problem however when writing a Boolean variable.
This is a line of code i have in most of my Storylines.
player.SetVar("javascriptsLoaded", true);
When my external JS libraries are loaded ( jQuery eg. ) it sets the Boolean variable javascriptLoaded to true ( In Storyline its shown as True ). This works perfectly.
2nd Day of presentations on the Articulate Usersdays overhere done. One trick i learned was some nice script ( i guess its from somewhere on the forum too... Zsolts i presume ) that shows all available variables in a popup. I guess i can rework that perfectly to reset all variables.
On my TODO list ;-)
Yes, as someone who does not know JS please can we have this. Although it's been 4 years so not looking good...
I would be very interested in this as well. I have several numeric entry variables in some courses that I would like to reset. I have a "Try again" button that returns the user to the beginning of a section, not the beginning of the course and the numeric entry field holds on to what initially was typed in. Of course I can change the variable to say "0" when the user leaves the slide but then they have to type over the 0 which is not what they would actually need to do. It would be nice if you could set the numericEntry variable to blank, but you have to type in a number
I would be interested in seeing some of your escape game projects! I will be creating one, and it's always awesome to have similar, existing materials to hijack. LOL.
Hi:
Looking to see an update on this. I was just reworking a section of a course where the user can go back and try again and had to write 50+ triggers to reset variables. In this particular case I needed most variables reset, but not every one.... quite tedious. Even if it we had an "all or none" solution, I could have much more easily had it reset them all and then revert the ones that didn't need to be reset back to the current value.
Thanks!
I echo Lori's comment... although I don't plan to create any at this time, I love to see the kinds of things other people come up with. :)