Reduce scores in a leaderboard?
I'm making a game about steal value("flags"), and I wanted to make a leaderboard about how much flags players have.
Since other players can steal you your "flags" I need to update that leaderboard evend with lower "scores". But for now my leaderboard only update when I submit a higher score.
Yes you can do this with a event that tracks a score attribute with it's Default Calculation set to SUM. If you set up your event and leaderboard like below I'll explain how it works.
Next our Leaderboard is set up to track this attribute in Real Time.
Now you can log in as a user in the Test Harness and test you event. You can send the following.
Now navigate to the Manage Screen and click the leaderboards tab to view the entries on our new created leaderboard. You should see 100 for the current player. Back in the Test Harness you can now send the following.
This will remove 50 from the players score on the leaderboard, if you refresh the leaderboard you should now the see the test user has a score of 50. Try that and let me know if you have any further questions.
Just one more little question, how can player A submit a score for player B?
Hi Ricardo you can use a SparkRequest to send a request as another player.
Using this method on a leaderboard will mean you don't have to update a collection manually. Try that and let me know if you have any other questions.
Work like charm! Thanks a lot Liam!
No problem, happy to have helped you get this up and running !