Implementing a Local Leaderboard for high scores

Hi all,

What would be the best way of implementing a simple local leaderboard system for keeping high scores? Is there a way to pass the data along each time the level resets? I’ve created the text blocks in UMG to show the scores, just curious about how to retain saved high scores each play.

Many thanks!

You can use the SaveGame functionality.

Simply add names and scores to an array for each score and read out the first once.

…you should also limit to maybe the first 10/50/100 scores but theoretically this would be how I would do it.

Edit: For the savegame thing here is a fairly nice tutorial:

Thanks this is perfect!

Do you have an example blueprint. I’m having difficulty trying to get the array to hold the names and score and come out in order of highest to lowest

Here’s a function to sort an array of scores (and the array of names along with it):

(may need to zoom in your browser to see the pic)

How did you make the “Min of int array”, “Impure”? Can only find “Min of int array” and “Max of int array”, but not an “impure” one that i can connect with the branch.

I would like to know as well… How to make “Max of Int Array” impure?