{"name":"BIS_fnc_bitflagsSet","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","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Sets one or more flags in the given flagset, represented with decimal or hexadecimal number\n(Hexadecimal number representation is simply auto-converted into decimal by the engine)\nTo check which flags are present in given flagset use BIS_fnc_bitflagsToArray\n\n**Limitations**:\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","params":[{"name":"flagset","type":"Number","description":"flagset","type_expr":"Number"},{"name":"flag","type":"Number","description":"one or more flags to set","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"new flagset with given flag or flags set"}}],"examples":[{"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)"]}],"see_also":["BIS_fnc_bitflagsFlip","BIS_fnc_bitflagsCheck","BIS_fnc_bitflagsToArray","BIS_fnc_bitflagsUnset"]}