I am not able to configure a team leaderboard in a desired way. I would appreciate all possible help.
I want it to be based on sum of each member's max score. Not the sum of all scores.
Player1 and Player2 are in the same team called Team1.
Player1 scores 100, Player2 scores 10 --> Team score should be 110 now.
Then Player1 scores 200 --> Team score should be 210 now.
Any configuration that I am trying gives at the end 310 or 200 which is not what I want. Is it possible to achieve in GameSparks?
I think for this setup you'd need two leaderboards. One to track the player's max score and another to track the team score. The way this would work would be:
- Player/client sends score event to the player max score leaderboard (Maximum calculation type).
- This will trigger a 'NewHighScoreMessage'.
- In the NewHighScoreMessage script retrieve the score and post to the team leaderboard via SparkRequests (Sum calculation type).
This way the Team's Sum leaderboard will only be triggered when a player has beaten their previous high score. If you have any further questions or run into any difficulties implementing this please let us know.
You could implement this using the NewHighScoreMessage script to store the player's previous high score in their scriptData. Each time the message is triggered, check if the player has a previous high score saved and retrieve it before updating it with the new score. Then use the difference between the two to update your team leaderboard.