Trophies - stingray.Trophies namespace reference - Stingray Lua API Reference
The interface to access trophy functionality on PlayStation 4.
As the object is a singleton (there is only one Trophies), you do not need to pass any Trophies
object to the functions. All the functions operate on the Trophies singleton.
Asynchronous operations return an id that you can pass in calls to status() to fetch progress during
the operation. You must free the memory that is used for this object by calling free() when the operation
is done. Otherwise, the game will eventually run out of memory.
|
Creates the trophy context for the player with id user_id.
|
Parameters user_id : | integer | The ID of the player. |
Returns
|
Frees all data that the trophies system keeps track of for the operation with the specified ID.
|
Parameters id : | integer | The ID of the operation. |
Returns | This function does not return any values. |
You must call free() on all ids that you get back, whether or not the operation completed successfully.
Otherwise, the trophies system will eventually run out of memory.
|
Removes the trophy context of the player with id user_id.
|
Parameters user_id : | integer | The ID of the player. |
Returns
|
Returns the status of the operation with the specified ID.
|
Parameters id : | integer | The ID of the operation to query. |
Returns integer |
The status of the operation with the specified ID.
May be any of the status code constants.
|
|
unlock ( user_id, trophy_id ) : integer
Unlocks the trophy with the trophy_id for the player with the user_id.
|
Parameters user_id : | integer | The ID of the player. |
trophy_id : | integer | The ID of the trophy. |
Returns
For example:
May be returned by calls to status().
|
The operation has successfully completed.
|
|
An error occurred during the operation.
|
|
The operation has started, but not yet finished.
|
|
Either the ID was never created, or it has already been freed.
|