All pastes #2093677 Raw Edit

Unnamed

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

  _objectiveIndex = 0;
  if (isNil "objectives") then {
    objectives = [0];
  } else {
    objectives = objectives + [0];
    _objectiveIndex = (count objectives) -1;
  };
  
  _isUncon = {
    _man = _this select 0;
    _uncon = [_man] call ace_sys_wounds_isUncon;
    if (isNil "_uncon") then { _uncon = false; };
    _uncon
  };

  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 ( (_countWest >= 2) && (_countEast == 0) && ((objectives select _objectiveIndex) < 10) ) then {
	  objectives set [_objectiveIndex, (objectives select _objectiveIndex) +1];
	};
	if ( (_countEast >= 2) && (_countWest == 0) && (objectives select _objectiveIndex) > -10) then {
	  objectives set [_objectiveIndex, (objectives select _objectiveIndex) -1];
	};

	if (_points >= 10) then { // 300 seconds

	};
  _return};
};