All pastes #2093663 Raw Edit

Stuff

public text v1 · immutable
#2093663 ·published 2011-11-10 21:25 UTC
rendered paste body
if (isServer) then {
  _pos  = _this select 0;
  _radius = _this select 1;

  _isUncon = {
    _man = _this select 0;
    _uncon = [_man] call ace_sys_wounds_isUncon;
    if (isNil "_uncon") then { _uncon = false; };
    _uncon
  };

  _points = 0;
  waitUntil {
    _return = false;
    sleep 10;

    _countWest = { (_x getVariable ["sandi_framework_side", side player] == west) && ((_x distance _pos) < _radius) && (alive _x) && !([_x] call _isUncon) } count allUnits;
    _countEast = { (_x getVariable ["sandi_framework_side", side player] == east) && ((_x distance _pos) < _radius) && (alive _x) && !([_x] call _isUncon) } count allUnits;

    if (_countEast > (_countWest * 5)) then {
      _points = _points +1;
    };
    if (_countWest > (_countEast * 2) && _points > 0) then {
      _points = _points -1;
    };

    if (_points >= 22) then { // 300 seconds
      ["sandi_endMission", ["objective"]] call CBA_fnc_globalEvent;
      _return = true;
    };
  _return};
};