{"name":"BIS_fnc_bitflagsSet","operator":null,"title":"BIS fnc bitflagsSet","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_bitflagsSet","revid":328600,"updated":"2022-07-13T17:02:31Z","groups":["Bitwise"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.66"}],"since":{"game":"arma3","name":"Arma 3","version":"1.66"},"arma3_since":"1.66","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Sets one or more flags in the given flagset, represented with decimal or hexadecimal number\n\n(Hexadecimal number representation is simply auto-converted into decimal by the engine)\n\nTo check which flags are present in given flagset use BIS_fnc_bitflagsToArray\n\n**Limitations**:\n\nDue to various limitations of the Real Virtuality engine this function is\nintended to work with unsigned 24 bit integers only. This means that the\nsupported range is 2^0...2^24 (1...16777216)","syntaxes":[{"syntax":"[flagset, flag] call BIS_fnc_bitflagsSet","since":null,"effect":null,"exec":null,"params":[{"name":"flagset","type":"Number","optional":false,"default":null,"description":"flagset","types":["Number"],"since":null,"text":"flagset: Number - flagset"},{"name":"flag","type":"Number","optional":false,"default":null,"description":"one or more flags to set","types":["Number"],"since":null,"text":"flag: Number - one or more flags to set"}],"returns":{"type":"Number","types":["Number"],"description":"new flagset with given flag or flags set","text":"Number  - new flagset with given flag or flags set"}}],"examples":[{"text":"```sqf\n[0, 16] call BIS_fnc_bitflagsSet; // 16\n[16, 2] call BIS_fnc_bitflagsSet; // 18 (which is 2 + 16)\n[18, 2 + 8 + 16] call BIS_fnc_bitflagsSet; // 26 (which is 2 + 8 + 16)\n```","code":["[0, 16] call BIS_fnc_bitflagsSet; // 16\n[16, 2] call BIS_fnc_bitflagsSet; // 18 (which is 2 + 16)\n[18, 2 + 8 + 16] call BIS_fnc_bitflagsSet; // 26 (which is 2 + 8 + 16)"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_bitflagsFlip","BIS_fnc_bitflagsCheck","BIS_fnc_bitflagsToArray","BIS_fnc_bitflagsUnset"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Bitwise","Functions","Introduced with Arma 3 version 1.66"],"docblock":null,"filled_from_docblock":[]}