Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Returns true if conditions are met to activate trigger. false if not.
- // Compile somewhere: fnc_MyFunc = compile preProcessFileLineNumbers "fnc_myFunc.sqf";
- #define MIN_PLAYERS 3
- if (d_no_more_observers) exitWith { false };
- if ({((getposATL _x) select 2) > 3} count _this > 0) exitWith { false }; // Flying vehicles in trigger area, exit.
- // Might misunderstand the requirement, perhaps needs to move to the vehicle / player check below?
- private ["_playerCount"];
- _playerCount = 0;
- {
- if (_x isKindOf "Man") then {
- if (isPlayer _x) then { _playerCount = _playerCount + 1 };
- } else {
- { if (isPlayer _x) then { _playerCount = _playerCount + 1 } } forEach (crew _x);
- };
- if (_playerCount >= MIN_PLAYERS) exitWith {}; // exit loop scope
- } forEach _this;
- if (_playerCount < MIN_PLAYERS) exitWith { false };
- true;
Add Comment
Please, Sign In to add comment