Difference between revisions of "SetSteamAchievement"

From The Official Visionaire Studio: Adventure Game Engine Wiki
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
+
==setSteamAchievement==
<span class="bold">Command History</span>
 
<div class="mw-collapsible-content">
 
<div class="alt-bg">Available since v3.7</div>
 
</div></div>
 
  
 +
<div class="command-min-version-info">Available since: <span class="command-min-version">v3.6</span></div>
  
Gets current state of a steam achievement!
+
<div class="command-doc">Sets an achievement to done.
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
 
<span class="bold">Additional Info</span>
 
<div class="mw-collapsible-content">
 
<div>This command will only work if the steam_api library was included (& successfully loaded) & if a steam account for your game exists!</div>
 
</div></div>
 
  
 +
Note: this command only works if the steam_api library was loaded and if a steam account for your game exists.</div>
  
Syntax:
+
Lua Syntax:
<syntaxhighlight>
+
<pre class="command-syntax">setSteamAchievement(apiName, {flags=1,  
setSteamAchievement(apiName, {flags=1, clear = true|false})
+
    clear = true|false})</pre>
</syntaxhighlight>
+
===Arguments===
 +
====apiName====
 +
:'''"string"''' - The name of the achievement to set. This is the API name specified in the steam account.
 +
===Flags===
 +
====clr/clear====
  
 
+
:If true the achievement will be cleared. Default value is false.
Example:
+
===Return Values===
<syntaxhighlight>
+
;success
-- to do!
+
:True if the achievement was set successfully, false if the operation failed.
</syntaxhighlight>
+
===Examples===
 
+
None.
 
 
 
 
<span class="bold underline">Arguments</span>
 
 
 
<span class="bold">apiName</span>: "string" <br/>
 
The name of the requested achievement (this is the API name specified in the steam account for your game)
 
 
 
 
 
<span class="bold underline">Flags</span>
 
 
 
<span class="bold">clr/clear</span>: boolean (true/false) <br/>
 
If true the achievement will be cleared. Default value is false!
 
 
 
 
 
<span class="bold underline">Return</span>
 
 
 
<span class="bold">success</span> <br/>
 
True if the achievement was set successfully, false if the operation failed!
 
{{i18n|SetSteamAchievement}} <br/>
 
{| class="tbl-ds"
 
|-
 
|<span class="bold">Relevant Pages</span>: [[GetSteamAchievement|getSteamAchievement]] - [[GetSteamStat|getSteamStat]] - [[ResetSteamStats|resetSteamStats]] - [[SetSteamStat|setSteamStat]]
 
|}
 

Latest revision as of 21:28, 30 September 2014

setSteamAchievement

Available since: v3.6
Sets an achievement to done. Note: this command only works if the steam_api library was loaded and if a steam account for your game exists.

Lua Syntax:

setSteamAchievement(apiName, {flags=1, 
    clear = true|false})

Arguments

apiName

"string" - The name of the achievement to set. This is the API name specified in the steam account.

Flags

clr/clear

If true the achievement will be cleared. Default value is false.

Return Values

success
True if the achievement was set successfully, false if the operation failed.

Examples

None.