Revision Difference
achievements.GetCount#567721
<function name="GetCount" parent="achievements" type="libraryfunc">
<description>Retrieves progress of given achievement.</description>
<description>Retrieves the progress of the given achievement.</description>
<realm>Client and Menu</realm>
<args>
<arg name="achievementID" type="number">The ID of achievement to retrieve progress of. Note: IDs start from 0, not 1.</arg>
<arg name="achievementID" type="number">The ID of the achievement.</arg>
</args>
<rets>⤶
<ret name="" type="number">The numerical progress.⤶
⤶
One-time achievements **always** have the progress of 0.</ret>⤶
</rets>⤶
</function>
<example>
<description>Will print achievement progress for all of your achievements into console.</description>
<description>Prints your current progress for every achievement into the console.</description>
<code>
for i = 0, achievements.Count() - 1 do
print( achievements.GetCount( i ) )
for i = 1, achievements.Count() - 1 do
print( achievements.GetName( i ), achievements.GetCount( i ) )
end
</code>
<output>⤶
Prints achievement progress for all of your achievements into console.⤶
Note: Non-progress based achievements will have 0, even if they are completed.⤶
</output>⤶
⤶
</example></example>
Garry's Mod
Rust
Steamworks
Wiki Help