Place them in an array of maximum slot count size and then perform a sort by rank on them. You can then iterate through them in rank order in a simple loop.
Sorting algorithms are described on Wikipedia. A simple loop is nothing more than advancing through indexes in an array, often called a for loop.
If you use a leaderboard that can be made to do this automatically and the player can be fetched for a certain position. However I do recall there being some off by 1 bugs with leaderboards.
Well it depends how you'd want the ranks to be shown. Would you prefer a Leaderboard where it's almost defaultly made for you just a view tweeks to make it work towards your favor or would you prefer Dialog where you'd have to customize everything?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
I want to make ranking system.
I want to select player who has highest score, second score.... and sixth score.
Is it possible?
Place them in an array of maximum slot count size and then perform a sort by rank on them. You can then iterate through them in rank order in a simple loop.
Sorting algorithms are described on Wikipedia. A simple loop is nothing more than advancing through indexes in an array, often called a for loop.
If you use a leaderboard that can be made to do this automatically and the player can be fetched for a certain position. However I do recall there being some off by 1 bugs with leaderboards.
Could you tell me, the name of Action?
Well it depends how you'd want the ranks to be shown. Would you prefer a Leaderboard where it's almost defaultly made for you just a view tweeks to make it work towards your favor or would you prefer Dialog where you'd have to customize everything?