Type Function Return value Array Revision Current Public Release (2018.3326) Keywords steam, steamworks, achievements, getAchievementNames See also steamworks.getAchievementInfo() steamworks.*
Fetches the unique names of all achievements configured for the application and returns it as an array of strings. On the Steamworks website, these are the unique achievement names listed under the
This function will return an empty array in the following cases:
false, indicating that the application is not currently connected to the Steam client.
local steamworks = require( "plugin.steamworks" ) -- Print information about all achievements belonging to this application local achievementNames = steamworks.getAchievementNames() for index = 1, #achievementNames do -- Fetch information about the next achievement local achievementName = achievementNames[index] local achievementInfo = steamworks.getAchievementInfo( achievementName ) -- Print the achievement's information/status to the log print( "Achievement " .. tostring(index) ) print( " Localized Name: " .. achievementInfo.localizedName ) print( " Localized Description: " .. achievementInfo.localizedDescription ) print( " Is Unlocked: " .. tostring(achievementInfo.unlocked) ) end