{"name":"setStatValue","operator":null,"title":"setStatValue","type":"command","url":"https://community.bistudio.com/wiki/setStatValue","revid":319644,"updated":"2022-05-13T09:24:37Z","groups":["System"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.18"}],"since":{"game":"arma3","name":"Arma 3","version":"1.18"},"arma3_since":"1.18","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Sets a value to a given stat.\n\nA list of possible StatNames can be found here: Arma 3: Stat Names\n\nIts important to note that most Stats are restricted to scripts and missions in certain paths.\n\nFor example \"ExpWarlockDown\" is restricted to scripts in any subdirectory of `\"a3\\Missions_F_Exp\\Campaign\\Missions\\\"`","syntaxes":[{"syntax":"setStatValue [name, value]","since":null,"effect":null,"exec":null,"params":[{"name":"name","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"name: String"},{"name":"value","type":"Number","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"value: Number"}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"unary","operator":null,"left":null,"right":{"text":"[name, value]","types":["Array"]}}],"examples":[{"text":"```sqf\nsetStatValue [\"ExpWarlockDown\", 1]; // Unlocks the \"Warlock Down\" Steam achivement\n```","code":["setStatValue [\"ExpWarlockDown\", 1]; // Unlocks the \"Warlock Down\" Steam achivement"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getStatValue","Arma 3: Stat Names"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: System","Introduced with Arma 3 version 1.18","Scripting Commands"]}