mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
18 lines
683 B
Plaintext
18 lines
683 B
Plaintext
// by commy2
|
|
|
|
private ["_unit", "_need"];
|
|
_unit = _this select 0;
|
|
_need = _this select 1;
|
|
|
|
// can treat self?
|
|
if ([_unit, _unit, _need] call AGM_Medical_fnc_aiCanTreat) then {//systemChat format ["%1 : %2", [_unit, _unit, _need] call AGM_Medical_fnc_aiTreat, [_unit, _unit, _need]];
|
|
[_unit, _unit, _need] call AGM_Medical_fnc_aiTreat;
|
|
} else {
|
|
// if not, then find group member that can treat instead
|
|
{
|
|
if ([_x, _unit, _need] call AGM_Medical_fnc_aiCanTreat) exitWith {//systemChat format ["%1 : %2", [_unit, _unit, _need] call AGM_Medical_fnc_aiTreat, [_unit, _unit, _need]];
|
|
[_x, _unit, _need] call AGM_Medical_fnc_aiTreat;
|
|
};
|
|
} forEach units group _unit;
|
|
};
|