mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
28 lines
425 B
Plaintext
28 lines
425 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: commy2
|
|
* Convert an array of booleans into a number.
|
|
*
|
|
* Arguments:
|
|
* 0: Boolean <BOOL>
|
|
* 1: Boolean <BOOL>
|
|
* 2: Boolean <BOOL>
|
|
* ...
|
|
*
|
|
* Return Value:
|
|
* Bitmask <NUMBER>
|
|
*
|
|
* Example:
|
|
* [[true, false]] call ace_common_fnc_toBitmask
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
private _result = 0;
|
|
|
|
{
|
|
if (_x) then {_result = _result + 2 ^ _forEachIndex};
|
|
} forEach _this;
|
|
|
|
_result
|