question

Tanishq Malu avatar image
Tanishq Malu asked

Is there a way to get information on rank updates in a given Leaderboard for a given player.,Is there a way to get previous leaderboard position of a player.

Suppose There is a leaderboard associated to any given statistic. At the current moment I have some rank R1. Now, I play a game and my statistic value changes. This change will update my rank in the leaderboard to lets say R2.

Now if i fetch my current position from the leaderboard, I will get R2 as the answer. But can i somehow get the previous rank R1 from which it got updated to R2.

One solution is to maintain a local variable in the frontend side and check for the difference in the values. Does playfab provides any in-built solution to this?

Also a more extended version of this is to maintain a history of all the changes in the ranks of a player in a given leaderboard.,Suppose There is a leaderboard associated to any given statistic. At the current moment I have some rank R1. Now, I play a game and my statistic value changes. This change will update my rank in the leaderboard to lets say R2.

Now if i fetch my current position from the leaderboard, I will get R2 as the answer. But can i somehow get the previous rank R1 from which it got updated to R2.

One solution is to maintain a local variable in the frontend side and check for the difference in the values. Does playfab provides any in-built solution to this?

apisLeaderboards and Statistics
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

·
Neils Shi avatar image
Neils Shi answered

Currently, PlayFab doesn't have a built-in solution to track players' changes in their leaderboard rankings. As you mentioned, you may maintain a local variable in the frontend side and check for the difference in the values. Or you can create a Rule which trigger Azure Function when the event “player_statistic_changed” occurs. In the Azure Function, you can call API GetLeaderboardAroundPlayer to get player’s position, and save position data in player data. Later, they can view the previous location information in player data.

10 |1200

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

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.