How can I load a Storyline 'Results' variable from my own var?

I want to accumulate a user's scores in my own project variable as they work through various interactive exercises (they are not standard Quiz slides) and then pass this final assessment score via SCORM 1.2 to an LMS. 

I know that the Storyline Results slide variable 'Results.ScorePoints' gets sent OK via SCORM but it seems none of these 'system' variables can be set to equal the value of my own variable. They just don't appear in the 'Adjust Variable' panel. 

If there is no way to directly set these hidden 'Results' variables within SL, might it be possible to use JavaScript to

-   Get 'Results.ScorePoints' as well as the contents of my own accumulated score variable

-   Load 'Results.ScorePoints' with my variable, then

-   Set 'Results.ScorePoints' back into SL containing its new value?

Many thanks - any ideas?

5 Replies
Tim Neill

I'm having problems using JavaScript to manipulate variables fetched from Storyline and have no idea what I'm doing wrong.

My very simple test sends two text variables via JavaScript, concatenates them and should send back a single, combined variable.

This is the JavaScript:

var FirstName = player.GetVar("First");

var LastName = player.GetVar("Last");

var FullName = FirstName + Last Name

var player = GetPlayer();

player.SetVar("CompleteName",FullName);

I attach the Storyline file. I published it for CD and have tried it on different Windows 7 and XP systems but still no variable is being returned. What a pain it is to simply manipulate text in this way, inside or outside of Storyline. I used Authorware for 20 years and have been spoiled by terrific facilities in tis area!

Any ideas?

Many thanks, Tim