mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
22 lines
311 B
Plaintext
22 lines
311 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 = 0;
|
|
|
|
{
|
|
if (_x) then {_result = _result + 2 ^ _forEachIndex};
|
|
} forEach _this;
|
|
|
|
_result
|