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

3

Stats

1,942 visits, 2,564 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 30 Aug, 2018. Last updated 19 Feb, 2019

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)

  • 1 Comments

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