Achievement - stingray.Achievement namespace reference - Stingray Lua API Reference

stingray.Achievement namespace reference

Description

The interface for accessing the achievement functionality on Steam.

As the object is a singleton (there is only one Achievement), you do not need to pass any Achievement object to the functions. All the functions operate on the Achievement singleton.

Functions

Parameters

token :

integer

The token that provides access to the status of the asynchronous operation.

Returns

table

A table that indicates whether or not the operation is finished, and any errors encountered.

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.

This function is available in development builds only.

Parameters

achievement :

string+

The achievement or achievements to unlock.

The + notation indicates that there may be one or more instances of the specified type.
Returns

integer

Returns a token that you can pass to progress() to track the progress of the operation.

For example:

token1 = Achievement.unlock("high_jumper")
token2 = Achievement.unlock("high_jumper", "mega_jumper")
Parameters

achievement :

string

The achievement you want to test.

Returns

boolean

Returns true if the achievement is unlocked, or false otherwise.

For example:

unlocked = Achievement.unlocked("mega_jumper")