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, I think you will also need to move the JavaScript onto you 1.8 leaderboard slide to make sure it picks up the current users attempt/score. The script is currently processing before the user has attempted the quiz and userScore will be "0" at this stage.
See attached file for a correction in functionality. The summary of changes are:
- Assign Quiz1.ScorePoints to userScore on timeline start of the results slide
- Move the JavaScript to the leaderboard slide so that when the leaderboard variable is assigned a value, it includes the latest value of userScore.