Forum Discussion
JudithReymon104
8 months agoCommunity Member
How do I get my quiz score and leaderboard score to be the same variable?
Greetings, Heros
This is embarrassing, but....
I am prototyping a game for a class, and I managed to build a Leaderboard, which uses a variable userScore in Javascript (This will be on the firs...
SamHill
8 months agoSuper Hero
Hi Judith, you've done really well to get so far with this.
When you build quizzes with a results slide in Storyline it defines it's own variables as you've probably found. You can see these in the variables view "Built-in" tab. For each quiz, there are fours variables (where QuizName is the name you define on the results configuration): "Quizname.PassPercent", "Quizname.PassPoints", "Quizname.ScorePercent", "Quizname.ScorePoints". These variables cannot be accessed via JavaScript, and have to be assigned to a user defined variable so they can be. So what you could do in your instance is assign "Quiz1.ScorePoints" to "userScore". Add this to your results slide so the userScore is updated when the Results slide is processed.