need help with high scores


  • *
  • Posts: 15
I Have a level select scene.
I want that under the levels comes the best time.
but i don't know how.
Everylevel has its time count and it stops counting when actor is in goal.

And if it can i want a total time of all the levels together.
i hope somebody can help me.


  • Posts: 72

You have to:
1. Make Game Attributes to save best times. I think 'list' should be array so it's ok to use it.
2. The default value for all is 0
3. When the player finishes level and 'it stops counting' - compare this attribute with the best time - if your new time is better - set the attribute to the new value.

4. Use the save/load features described in the link.

5. You'll have to display this values in the level select scene. You can use 'draw text' block.

For 'all time' - make attribute and when you finish the level - attribute += time :)


  • *
  • Posts: 4645
Actually, for "all time" you'd not want to add to it at the level end, otherwise it could grow with each time added including new better times (unless you look it up and subtract the old time). A better way would be to just take every item in the list (level times) and add them together. That way you just do it once each time the level select scene is opened and it accounts for new, better times automatically.
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.