Forum Discussion
SetVar and GetVar March 2025 Update Question
Before I update my Storyline installation to the March 18, 2025 (Build 3.98.34222.0) build, can someone tell me if SetVar and GetVar will still work?
I ask because in the Advanced Storyline support article: https://access.articulate.com/support/article/Storyline-360-Advanced-JavaScript-API
...it mentions in the: "Variables (previously GetVar and SetVar)" section...
to use:
- Retrieve a variable's value: getVar('name')
- Set a variable's value: setVar('name', value)
Will this change break existing courses that use SetVar and GetVar in triggers when a course is opened/re-published?
Hey,
I've also tried it and I didn't have to change the old version as long as it's used with getting the player first
var player = GetPlayer(); player.GetVar("name"); player.SetVar("name", value);
The new functions are working without getting the player
getVar("name"); setVar("name", value);
3 Replies
- CharlotteHaslerCommunity Member
Hey,
I've also tried it and I didn't have to change the old version as long as it's used with getting the player first
var player = GetPlayer(); player.GetVar("name"); player.SetVar("name", value);
The new functions are working without getting the player
getVar("name"); setVar("name", value);
- ScottNodine-109Community Member
Thanks for the reply Charlotte. That eases my mind because I've always used it like:
var player = GetPlayer(); player.GetVar("name"); player.SetVar("name", value);
...so that won't break any existing courses when open/re-published in the new version (March 2025).
Much appreciated!
- audreyaCommunity Member
Hello,
You have to change the case of the function to respect the new way of naming it, otherwise it fails at least with my test.
Maybe you can open your JS file with an external file editor just to identify each occurrence.
Hope that help