Anyone managed to unlock a Steam achievement via code (not stats)?

Has anyone been able to unlock a Steam achievement from code?
Note: I’m not talking about achievements tied to stats, those unlock fine for me automatically when the stat hits the target value.

What I don’t get is why steamworks.setAchievementUnlocked() won’t unlock an achievement that’s not stat-based. My code looks solid (as far as I can tell), but it just won’t fire. Any ideas?

Hi,
The only extra care I take is save the unlocked achievements into a file so I can synchronize it with the server later even if the first unlock request will fail.

Since your stats successfully updates (and I guess they are multiple calls), I’m moved to think 1 call may fail for some reasons but a later attempt would succeed?

This or maybe the achievements aren’t configured/exposed properly.

Try to log it and see if it gives you a error or anything

1 Like

My issue is that achievements not tied to stats won’t unlock from my code, while the stat-based ones unlock just fine when the stat hits the configured value.

The code is straightforward (I’ve checked it multiple times) and I also keep variable references/flags for unlocked achievements to track them. Still, several users report that those non–stat-based achievements don’t unlock for them either. That’s why I’m starting to think steamworks.setAchievementUnlocked() might not be working perfectly, especially since it was added to the Steamworks plugin fairly recently.

Okay, but I do have non-stats achievements.

I only have non-stats achievements…

So maybe the issue is with having both types mixed together?

We can compare our set-up inside Steam if you want.

Just confirm those achievements have been 100% published and tell me what the log says about those calls, so we can exclude obvious reasons before we start