question

Eduardo Philipe Viana de Lima avatar image
Eduardo Philipe Viana de Lima asked

Change Leaderboard

Good evening everyone, I was waiting for the Leaderboard v2 version to arrive, but since there is still no forecast I wanted to put my hand in the dough and make an alternative. I wanted to implement a rule that as soon as a certain player reaches the required score (eg player reached 100 points) he would be moved to another leaderboard automatically in this case there would be 3 leaderboards noob intermediary and advanced.

So in Unity it would show the leaderboard in which it is, if it reaches 100 it would be moved to the intermediate leaderboard and so on.

The question is:

1) this is possible, there is a way to automate the leaderboard change (perhaps via cloud script)

2) so it changes leaderboard when I make the leaderboard request show the leaderboard that the player is on?

I tried to find a similar question that might help me, but I couldn't.

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

·
Xiao Zha avatar image
Xiao Zha answered

>> 1) this is possible, there is a way to automate the leaderboard change (perhaps via cloud script)

You can create a rule which can be triggered when the score reaches the required score to execute a Could Script in which you can call Update Player Statistics API to add a new statistic to the player and set the old statistic to 0. (Since you cannot delete the statistic via code)

>> 2) so it changes leaderboard when I make the leaderboard request show the leaderboard that the player is on?

You can set a flag in the player data to indicate which LeaderBoard the player is on and when player change to another LeaderBoard, you can change the flag. So, you can make the leaderboard request with the flag.

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.