Setting the Score Results Variable (Results1.ScorePercent)

I need to adjust or set the built in storyline variable.  I wish to set %Results1.ScorePercent% to be equal to a variable that I have created to show the results of a custom simulation exercise.  I was hoping to execute a JavaScript expression to set %Results1.ScorePercent% to be equal to my variable.

I tried the following as my custom variable is caller “score” with no luck.

var Results1.ScorePercent = score

Any advice is appreciated.  I know how to override the results displayed on the slide.  However, I want my custom score % to be submitted to the LMS with the "Submit" trigger.



3 Replies
Joey Buys

Hi Ron.

Rename your storyline variable to 'Score' (capital S).

Try adding the  following JavaScript to a trigger that executes when the timelines starts on your results slide and see if it works for you:

var player = GetPlayer();
var lmsAPI = parent;

var score = player.GetVar("Score");
lmsAPI.SetScore(score, 100, 0);