player removeAllEventHandlers "HandleHeal";
//player addEventHandler ["HandleHeal", dr_handle_healing];
dr_handle_healing =
{
diag_log "inside dr_handle_healing";
private ["_unit", "_healer", "_medic", "_damage"];
_unit = _this select 0;
_healer = _this select 1;
_medic = _this select 2;
_damage = 0.4;
if (_medic) then {
// Medic has beter healing
_damage = 0.2;
};
if (damage _unit > _damage) then {
_unit setDamage _damage;
diag_log format ["unit %1 is healed by %2 to damage %3", _unit, _healer, _damage];
systemchat format ["unit %1 is healed by %2 to damage %3", _unit, _healer, _damage];
};
// AISFinishHeal [_unit, _healer, _medic];
//true;
};
player addEventHandler ["HandleHeal", dr_handle_healing];