How to get rank order of a High Score board or several values

Stats

182 visits, 193 views

Translations

This tutorial hasn't been translated.

Tools

This tuto leads you to get automatic rank order of a group of several values (10 here but you can do with as much as you want) from higher to lower. ideal to get a hi-scores board or any other stuff that needs rank ordered values.

(capx attached)

To begin, let's create a Score text object with these 3 variables : 'Score', 'Rank' and 'Done'

Then, let's add this event to get the score display of each Score object (each score will have its text set to its value 'Score')

and let's add the Y position of each Score too, according to its rank (you can modify to get the position you prefer)

Let's now add these 3 events, to test to good working of this method, so you'll be able to upgrade or downgrade each score by clicking right/left mouse button on it, and then refresh the order by pressing any key,

but make sure to remove them in your final project!

Ok now we are ready to insert the magical tricks to get the automatic right order anytime,

Let's do this way, this event with these sub-events :

Ok we are done, now you can change any score value with mouse and press any key to refresh order and you'll see all the scores will miraculousy get in the right order :)

(capx attached)

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!