setStatValue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|PARAMETER1= |p3=" to "|PARAMETER2= |p3=")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.18


|1.18|Game version=
|gr1= System
____________________________________________________________________________________________


| Sets a value to a given stat. <br>
|descr= Sets a value to a given stat. <br>
A list of possible StatNames can be found here: [[StatNames]]<br>
A list of possible StatNames can be found here: [[Arma 3: Stat Names]]<br>
Its important to note that most Stats are restricted to scripts and missions in certain paths.<br>
Its important to note that most Stats are restricted to scripts and missions in certain paths.<br>
For example "ExpWarlockDown" is restricted to scripts in any subdirectory of "a3\Missions_F_Exp\Campaign\Missions\"
For example "ExpWarlockDown" is restricted to scripts in any subdirectory of {{hl|"a3\Missions_F_Exp\Campaign\Missions\"}}
|DESCRIPTION=
____________________________________________________________________________________________


| '''setStatValue''' [name, value] |SYNTAX=
|s1= [[setStatValue]] [name, value]


|p1= [name, value]: [[Array]] |PARAMETER1=
|p1= name: [[String]]
|p2= name: [[String]] |PARAMETER2=


|p3= value: [[Number]] |PARAMETER1=
|p2= value: [[Number]]


| [[Boolean]] |RETURNVALUE=
|r1= [[Boolean]]
____________________________________________________________________________________________
 
|x1= <code>setStatValue ["ExpWarlockDown", 1]; //Unlocks the "Warlock Down" Steam achivement </code> |EXAMPLE1=
____________________________________________________________________________________________


| [[getStatValue]] |SEEALSO=
|x1= <sqf>setStatValue ["ExpWarlockDown", 1]; // Unlocks the "Warlock Down" Steam achivement</sqf>


|seealso= [[getStatValue]] [[Arma 3: Stat Names]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Latest revision as of 10:24, 13 May 2022

Hover & click on the images for description

Description

Description:
Sets a value to a given stat.
A list of possible StatNames can be found here: Arma 3: Stat Names
Its important to note that most Stats are restricted to scripts and missions in certain paths.
For example "ExpWarlockDown" is restricted to scripts in any subdirectory of "a3\Missions_F_Exp\Campaign\Missions\"
Groups:
System

Syntax

Syntax:
setStatValue [name, value]
Parameters:
name: String
value: Number
Return Value:
Boolean

Examples

Example 1:
setStatValue ["ExpWarlockDown", 1]; // Unlocks the "Warlock Down" Steam achivement

Additional Information

See also:
getStatValue Arma 3: Stat Names

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note