We want to add Weekly tournaments. At the end of the weekly tournament there will be changes on players information more than just awards. There will also be reward but the rewards will not be given to the player as tournament ends. If player open a specific screen than will be able to see the result of the tournament.
How can we manage to get the end of the weekly tournament so that we can manage to do the arrangements?
We are not using challenges for tournaments because the challenge must end right when leaderboard reset itself.However we cannot get the end of tournament.
I hope I explained myself correctly.
If you were using a challenge leaderboard you could set the end time for the end of the current week to achieve this. You could also potentially use a partitioned leaderboard to achieve this functionality. The main requirement here would be giving out your rewrds based on finishing positions after the tournament has taken place, not during. Is that correct ?
As you said I decided to use challenge leaderboard for end time.
The requirement is giving rewards after tournament finished and when the player call "Claim" event to get them.
If you don't configure any achievements in your leaderboard you could give them out automatically to certain positions in the Global ChallengeWonMessage (this is sent at the end of a challenge). You could use the following to do this.
//send this sparkRequest as the challenger, get the leaderboard data for the current challenge var request = new SparkRequests.LeaderboardDataRequest(); request.challengeInstanceId = challengeID; request.entryCount = 5; var response = request.SendAs(Spark.getChallenge(challengeID).getChallengerId()); //give out achievemts to 1st and 2nd place var winner = response.data.userId Spark.loadPlayer(winner).addAchievement("1st_Place") var runnerUp = response.data.userId Spark.loadPlayer(runnerUp).addAchievement("2nd_Place")
So here you would be able to configure the achievements based on finishing position and award them accordingly. They would be given out automatically here when the challenge is over so you wouldn't need to send a "claim" event. If you have any other questions just let me know.