inesmoital
started a topic on Sat, 04 April 2015 at 5:21 AM
Is there a easy way to get a player position on a leaderboard?
inesmoital
started a topic on Sat, 04 April 2015 at 5:21 AM
Is there a easy way to get a player position on a leaderboard?
Best Answer
Brendan Vanous said on Sat, 04 April 2015 at 9:52 AM
Absolutely - just use GetLeaderboardAroundCurrentUser, with MaxResultsCount set to 1.
1 Comment
Brendan Vanous said on Sat, 04 April 2015 at 9:52 AM
Absolutely - just use GetLeaderboardAroundCurrentUser, with MaxResultsCount set to 1.
You can get the leaderboard scores around the current user via the GetLeaderboardAroundPlayer, regardless of whether the scores should be shown as largest or least first, as the target player will always be the center of the score listing. If your goal is to show the lowest scores at the top of the leaderboard though, and given that our leaderboards, like most, show the hightest scores at the top, what you could do would be to store scores an an inverse of the actual value. This is a common technique for racing games, registering the actual time to complete the rate as the abs of 1-the actual time or a max time - the actual time, in order to store it in a max-value-first format.
2 People are following this question.