I'm not sure if that's possible without some extra code in place but I'll look into this for you and let you know what I find. Have you tried to calculate this on the client side ? You could maybe use a LeaderboardEntriesRequest to get the current logged score for that player and then perform a calculation using the new score before submitting it ?
Thanks,
Liam
J
Jo Huang
said
about 7 years ago
Hi
Thanks, I'm trying to get this by client-side code.
Customer Support
said
about 7 years ago
Answer
Hey Jo,
If you are using C#, Math.Max(0, score) will give you what you want. Other languages have similar math functions.
Jo Huang
Hi
My leaderboard is designed for accumulating plus/minus scores with a lower bound.
ex: assume lower bound is "0",
when a user posts +2, -3, +1, +5, -10 -> results 0
when a user posts -2, -3, -4, -5, +1 -> results 1
Is that possible without cloud code?
Thanks a lot!
Jo
If you are using C#, Math.Max(0, score) will give you what you want.
Other languages have similar math functions.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Jo,
I'm not sure if that's possible without some extra code in place but I'll look into this for you and let you know what I find. Have you tried to calculate this on the client side ? You could maybe use a LeaderboardEntriesRequest to get the current logged score for that player and then perform a calculation using the new score before submitting it ?
Thanks,
Liam
Jo Huang
Hi
Thanks, I'm trying to get this by client-side code.
Customer Support
If you are using C#, Math.Max(0, score) will give you what you want.
Other languages have similar math functions.
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics