I looked at the runtime function reference and at the client reference. but I can’t seem to find a way do what I need.
Using our current analytics platform I can only “set” a property instead of having a highscore (so the lower value can overwrite a higher value), so I need to know, after submitting a record, what the player’s record is so I can update the analytics (and I can’t use the player’s submitted score since it might be lower than the highest saved score).
It’s a simple common feature so I’m sure I’m missing something, any thoughts or hints?
You can get the current leaderboard record specifically for any given user (or set of users) using the list by friends feature. It’s named that way because it’s intended to power a filtered leaderboard view of just your friends out of a larger leaderboard, but it will accept any user ID including the user’s own.
That aside leaderboard write operations already return the current score in the response, you shouldn’t need to make a follow-up request.
Thanks that’s quite useful I’ll use that instead!
Just for confirmation, it will return the current score saved on the server, even if it’s not equal to the submitted score? (e.g. in case the submitted is lower than the current saved)
You can try this yourself, but yes it will return the actual score on the leaderboard for the user.