Steam Leaderboards - SetIntStat is incrementing instead of replacing
I've finally gotten my code to write to my steam leaderboards! The answer was to create a stat in addition to the leaderboard in Steamworks (named "StatName_StatName" StatName = the stat name called in SetIntStat), and write to that.
However, now my code is incrementing the stat instead of replacing it - even using the SetIntStat function instead of IncrementIntStat.
Here's my code:
Does anyone have any ideas as to how to get Steam to just overwrite the stat instead of increment it?
My other option is to read the leaderboards, find the player ID, grab their previous high score and subtract the old one from the new one before uploading (example: Score - OldScore), but that's messy...With that method, I'm also struggling to figure out how to make the code wait for it to finish reading before it continues...
asked Oct 04 '16 at 01:39 AM in C++ Programming
The ScoreValue variable should be negative if you want to decrement the leaderboard score, I didn't found the way of overwriting it. I also has made this assignment like you did:
answered Feb 20 '18 at 03:41 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here