No acces to "Results.ScorePercent"? Dec 03, 2018 By Antoine Schaub var player = GetPlayer();var prozente = player.GetVar("Results.ScorePercent"); I don't understand, why this Javascript trigger does not work.
Daniel Servan over 4 years ago12/03/18 at 3:09 pm (UTC) Hi,Try to store Results.ScorePercent into a Variable on Timeline starts at the Results Page.Then access that Variable from a Javascript.I am not sure why accessing "Results.ScorePercent" is not accessible directly. It is maybe because that variable is PROTECTED.See my attached working sample. Untitled2.story
Jennifer Stein Daniel Servan over 4 years ago12/04/18 at 7:18 pm (UTC) This worked perfectly!!!FinalScore variable is declared as a number and can be accessed in JS... let player = GetPlayer();player.GetVar("FinalScore");
Michael Hinze over 4 years ago12/04/18 at 7:43 pm (UTC) All the Results.xxxxx variables are read-only and can't be manipulated in JS either.
Antoine Schaub Author over 4 years ago12/05/18 at 1:11 pm (UTC) this is a good solution. Thank you :D
5 Replies
Hi,
Try to store Results.ScorePercent into a Variable on Timeline starts at the Results Page.
Then access that Variable from a Javascript.
I am not sure why accessing "Results.ScorePercent" is not accessible directly. It is maybe because that variable is PROTECTED.
See my attached working sample.
This worked perfectly!!!
FinalScore variable is declared as a number and can be accessed in JS...
All the Results.xxxxx variables are read-only and can't be manipulated in JS either.
this is a good solution. Thank you :D
Thankyou for sharing. Very Nice!
This discussion is closed. You can start a new discussion or contact Articulate Support.