{"name":"BIS_fnc_counter","operator":null,"title":"BIS fnc counter","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_counter","revid":363648,"updated":"2024-04-11T15:43:06Z","groups":["Systems"],"status":"ok","replaced_by":[],"games":[{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":null,"description":"Modify the given counter, create it if does not exist.\n\n> [!IMPORTANT]\n> It is **not** possible to broadcast the counter (like setVariable does) with this function.","syntaxes":[{"syntax":"[varName, add, modulo] call BIS_fnc_counter","since":null,"effect":null,"exec":null,"params":[{"name":"varName","type":"String or Array format [varName, namespace]","optional":false,"default":null,"description":"default namespace is missionNamespace","types":["String","Array"],"since":null,"text":"varName: String or Array format [varName, namespace] - default namespace is missionNamespace"},{"name":"add","type":"Number","optional":true,"default":"0","description":"the value to be added","types":["Number"],"since":null,"text":"add: Number - (Optional, default 0) the value to be added"},{"name":"modulo","type":"Number","optional":true,"default":"-1","description":"the modulo to use for counter cycle, applied after the addition","types":["Number"],"since":null,"text":"modulo: Number - (Optional, default -1) the modulo to use for counter cycle, applied after the addition"}],"returns":{"type":"Number the new counter value","types":["Number"],"description":null,"text":"Number the new counter value"}}],"examples":[{"text":"```sqf\n[[\"TAG_Score\", player], 1] call BIS_fnc_counter;\n```","code":["[[\"TAG_Score\", player], 1] call BIS_fnc_counter;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_deleteCounter"],"notes":[],"categories":["Arma 3: Functions","Function Group: Systems","Functions","Functions: Local Effect","Introduced with Take On Helicopters version 1.00","Take On Helicopters: Functions","Take On Helicopters: New Functions"],"docblock":null,"filled_from_docblock":[]}