question

Sergi Hidalgo Baliarda avatar image
Sergi Hidalgo Baliarda asked

Increment Player Statistic Version Manually

I need to Increment Player Statistic Version when a player reaches the maximum game score, I need to increment the version to reset that all the player's score values.

Leaderboards 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

·
Seth Du avatar image
Seth Du answered

You can click “Reset Now” button in the leaderboard web page of Game Manager to reset the leaderboard. Otherwise you can call Admin API IncrementPlayerStatisticVersion to reset it.

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.

Sergi Hidalgo Baliarda avatar image Sergi Hidalgo Baliarda commented ·

I want that the player device when reaches the maximum game score to increment the player statistic version. I don't want to be checking everyday when that happens and do it my self. I know how to detect when one of the players reaches the maximum score, but i don't know how to increase the version at that moment via scripting.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Sergi Hidalgo Baliarda commented ·

Cloud Script doesn't support Admin API and actions can be done by Game Manager is via Server API. Your requirement will need an external agent server, where PlayFab SDK is implemented to call Admin API IncrementPlayerStatisticVersion. I believe a work around solution is when a player's statistic reaches the maximum value and is updated successfully via Cloud Script, a custom event will be generated. Meanwhile, you need to enable PlayFab Webhook to redirect all events to your agent server, where this custom event is monitored as a trigger of IncrementPlayerStatisticVersion API call.

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.