drarem Posted April 20, 2016 Share Posted April 20, 2016 Are there any exposed lua commands to steam achievements? I tried this but I get 'attempt to call SetAchievement (nil value)'... Steamworks:Initialize() Steamworks:SetAchievement("testing") Thanks. Quote Link to comment Share on other sites More sharing options...
Josh Posted April 20, 2016 Share Posted April 20, 2016 I am adding two commands to the Lua API: static void SetAchievement(const std::string& name);//lua static void IncrementAchievementProgress(const std::string& name);//lua 3 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
drarem Posted April 20, 2016 Author Share Posted April 20, 2016 Great, thanks! Quote Link to comment Share on other sites More sharing options...
Rick Posted April 20, 2016 Share Posted April 20, 2016 How do you know what the max value is for the achievement? Wouldn't we have to set that per achievement? Quote Link to comment Share on other sites More sharing options...
Josh Posted April 20, 2016 Share Posted April 20, 2016 It's set in your Steamworks account. I'm sure there's a function to retrieve the max value so you can display it in game, but I didn't need this for Leadwerks so I haven't bothered with it. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted April 20, 2016 Share Posted April 20, 2016 I'm confused. I assume SetAchievement() actually create an achievement? If so, then each needs a max value doesn't it? If not, then what does SetAchievement() do? Quote Link to comment Share on other sites More sharing options...
drarem Posted April 20, 2016 Author Share Posted April 20, 2016 I think in the steam account you set up a number of hard coded 'achievements'.. then you do a SetAchievement('hard coded achievement'), to set it to true to make the achievement 100%. For the increment, dont see how that works yet, but i'm guessing you can go from 0 to 100% for a certain achievement such as number of kills or what not. 1 Quote Link to comment Share on other sites More sharing options...
Rick Posted April 20, 2016 Share Posted April 20, 2016 Oh, so Set is actually completing it if it's more of a boolean type achievement, and increment if it's a progress type thing which would complete automatically once max value is reached. Can we create achievements for our workshop games? Guessing no but thought I'd ask. Quote Link to comment Share on other sites More sharing options...
tjheldna Posted April 21, 2016 Share Posted April 21, 2016 Can't seem to find anything for achievements in my account. Like Rick said is it possible for workshop games? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.