question

brendan avatar image
brendan asked

Player position on 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?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

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.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chris avatar image Chris commented ·

Hello !

How can I do this on a leaderboard set as minimum ?

0 Likes 0 ·
brendan avatar image brendan Chris commented ·

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.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.