Jump to content
Sign in to follow this  
BL1P

HandleHeal eventhandler and multiplayer

Recommended Posts

Its seems in testing that this eventhandler doesn't work in MP

it will only fire if the healer is healing himself.

and doesnt return the healercanheal correctly IE.. its always false.

can anyone confirm this as maybe I am doing something wrong ?

player removeAllEventHandlers "HandleHeal";
player addEventHandler ["HandleHeal", dr_handle_healing];

func

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;
};

Share this post


Link to post
Share on other sites

Confirmed mate. We also see this as part of the event tracking in ALiVE.

Share this post


Link to post
Share on other sites

K thanks Tupolov m8.

Dont suppose you know of another way to set max heal a medic and none medic can do ?

Because I would like to use a hospital building or Medical vehicle as the only places to get full heal via an addaction.

(already done that part just cant stop medics doing full heal.)

Edited by BL1P

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×