Global Command: setGameClientStat

From The Official Visionaire Studio: Adventure Game Engine Wiki

Sets the specified game client stat to the given value.

Note: this command only works, if the Steam API/GOG Galaxy library was loaded and if a Steam/GOG Galaxy account for your game exists.

Related functions getGameClientAchievement | getGameClientStat | getProperty | initGameClient | resetGameClientStats | setGameClientAchievement


Syntax

setGameClientStat(apiName, value)


Parameters

Parameter Type Description
apiName string The name of the stat to set. This is the API name specified in the Steam/GOG Galaxy account.
value integer The value the stat will be set to.


Return values

Type Description
boolean True if the stat value was set successfully, false if the operation failed.


Examples

Example 1: Set the "stat_progress" game client stat to a value of 30.

setGameClientStat("stat_progress", 30)