This is a re-usable sprite for storing a highscore list in a cloud variable, which you can copy to your own project. You may wanto to have a look at Scratch PacMan, as it shows its usage: https://scratch.mit.edu/projects/97137611/
How to use:
- developers must have scratcher level to create cloud variables
- users must have scratcher level to store highscores
- copy "Highscore" sprite to your project via backpack or "save to local file" / "upload sprite from file"
- create a cloud variable "HighscoreCloud"
- create a global variable "Score"
- place the two lists "Highscore: Names" and "Highscore: Scores" where you want them to appear later
- set "Score" variable and broadcast "HandleScore" message for adding a new score
- broadcast "ShowHighscore" message to show current highscores
- broadcast "HideHighscore" message to hide current highscores
- choose between auto-applying the username or prompting the user for his name by setting the "Mode" variable to 1 or 2
One possible extension would be not to simply display the Names and Scores lists, but to render the data using drawing operations. As such, any custom look&feel can be applied.
Please remember that cloud data is being audited, including the time when a change occurred, and which user provided the data.