Sign In Register

How can we help you today?

Start a new topic
Answered

Leaderboards that give rewards on reset

When our leaderboard resets every week I'd like to give rewards to the top 10 players.


I saw it was suggested that achievements be used to give rewards to players who reach global rank 1 for instance. However, I don't think that will behave the way I want. That looks to me like it will give a reward to any player that achieves rank 1 at any time during the event.


If I have a leaderboard that starts on Monday and ends on Sunday I want the rewards to only go to the top 10 players at the end of Sunday when the leaderboard resets. I do not want to give a reward to the player that achieves global rank 1 on Wednesday but drops down to rank 100 by Sunday for example.


Does a good solution for this exist?


Having access to a simple script that runs just before the leaderboard resets would make this kind of thing 1000% times easier.


Best Answer

Hi Corey,


The easiest way to achieve this would be to set up a second Leaderboard which Calculates Weekly using the same running total data from the Reset Weekly LeaderBoard you are currently using. Then set up your achievement to reward users who finish in the Top 10 positions when the Weekly Calculated Leaderboard is calculated (at the end of the week). In the example below I am using the Weekly Calculated Leaderboard to Trigger a GOLD achievement to players finishing in positions 1,2 and 3, you can set this up with your own achievements in your game.



With this in place you can award achievements to players on the Reset Leaderboard if they hit Rank 1 at any stage during that week while at the same time awarding achievements at the end of the week to players who finish in the top 10. Hope this helps, if you have any more questions just let me know.


Thanks,

Liam



Answer

Hi Corey,


The easiest way to achieve this would be to set up a second Leaderboard which Calculates Weekly using the same running total data from the Reset Weekly LeaderBoard you are currently using. Then set up your achievement to reward users who finish in the Top 10 positions when the Weekly Calculated Leaderboard is calculated (at the end of the week). In the example below I am using the Weekly Calculated Leaderboard to Trigger a GOLD achievement to players finishing in positions 1,2 and 3, you can set this up with your own achievements in your game.



With this in place you can award achievements to players on the Reset Leaderboard if they hit Rank 1 at any stage during that week while at the same time awarding achievements at the end of the week to players who finish in the top 10. Hope this helps, if you have any more questions just let me know.


Thanks,

Liam


Hi Liam,
I have the same problem than Cory. Isn't your solution gonna work only for the first week? I'm not sure if "Calculate" Leaderboards(LB) also reset or not, but if they don't I think the solution you gave will only work for the first week, because from the second week on, the scores from the "Reset" LB won't match the scores from the "Calculate" LB, since the "Reset" one already reset the socres.
I don't know if I explained it well enough, I hope so hehe.
Thank you!

 

Hello, 

I'm having the same problem. Actually I need the answer to the Javier's question? Can someone help?


Will the "Calculating Weekly Leaderboard" also reset with "Reset Weekly Leaderboard". Somehow, I don't think so. If then, how can I achieve what OP asked for?

Hi Alp,


I'm looking into this for Javier at the moment, I'll post any findings here for you to review.


Thanks,

Liam

Hello again 7 months later,


If anyone interested, thats how I solved my problem.

(which is how to have a leaderboard that resets weekly and checks for top ranks)


- Create a normal leaderboard 

- Create a cloud code in System-Daily that checks for week start, 


Cloud Code

- If weekstart

    - Iterate over your players in leaderboard

         - Award them by rank

    - Drop the leaderboard data



2 people like this

Do you by any chance can share your cloud code? So I don't have to do it from scratch?


Login to post a comment