Steam Leaderboards - SetIntStat is incrementing instead of replacing

Hey Everyone

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…

Have you figured this out? I can see how that’d work if the new score was higher but what if it was lower? Is there a way to completely replace the score as originally intended?

It won’t let me update it with a negative integer.

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:

UpdateMethod = ELeaderboardUpdateMethod::Force;