ACE3/addons/common/functions/fnc_toBitmask.sqf
2015-09-20 15:52:40 +02:00

23 lines
322 B
Plaintext

/*
* Author: commy2
* Convert an array of booleans into a number.
*
* Arguments:
* N: Booleans <ARRAY>
*
* Return Value:
* Bitmask <NUMBER>
*
* Public: Yes
*/
#include "script_component.hpp"
private "_result";
_result = 0;
{
if (_x) then {_result = _result + 2 ^ _forEachIndex};
} forEach _this;
_result