johnnyboy 3612 Posted October 25, 2018 I find it annoying that when healing using first aid kit, the player is only 75% healed, which means you have to listen to the player moaning and groaning forever until he can be healed by a medic (by a medkit). A mission maker can solve this for you by using the eventhandler below. With this eventHandler, player is always healed 100% when healing. I'm using this in my new mission Last Tango in Tanoa 2: Razing Cane. Hopefully someone else will find this useful. I can't take credit for this, as I think I found the example somewhere (a post or wiki?), but I don't remember where. So my apologies to the original author. player addEventHandler ["HandleHeal", { _this spawn { params ["_injured","_healer"]; _damage = damage _injured; if (_injured == _healer) then { waitUntil {damage _injured != _damage}; if (damage _injured < _damage) then { _injured setDamage 0; }; }; }; }]; 4 Share this post Link to post Share on other sites
HazJ 1287 Posted October 25, 2018 https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleHeal Here ^ 1 1 Share this post Link to post Share on other sites
johnnyboy 3612 Posted October 25, 2018 1 minute ago, HazJ said: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleHeal Here ^ Hah! That's where I got it. Like I said, I can't take credit for this one! Share this post Link to post Share on other sites
Robustcolor 24 Posted November 28, 2022 Does this work if someone else is healing you? I also read this Quote If unit walks away from the healer during healing action, the heal will not finish but there is no way to detect this within "HandleHeal" framework. So if removing this line if (_injured == _healer) then and adding something like this to the waitUntil, waitUntil {damage _injured != _damage || _healer distance2d _injured > 5}; Will it work? Share this post Link to post Share on other sites
honger 74 Posted November 28, 2022 1 hour ago, Robustcolor said: Does this work if someone else is healing you? I also read this So if removing this line if (_injured == _healer) then and adding something like this to the waitUntil, waitUntil {damage _injured != _damage || _healer distance2d _injured > 5}; Will it work? In your example when a unit finishes healing you, the 100% heal will trigger when damage changes OR distance between you and your healer is more than 5 meters, I assume you want the full heal only when damage is reduced and healer is close. If so, this addEventHandler ["HandleHeal", { _this spawn { params ["_injured", "_healer"]; private _damage = damage _injured; waitUntil { ((damage _injured != _damage) && (_healer distance2d _injured < 5))}; if (damage _injured < _damage) then { _injured setDamage 0; }; }; }]; will do the job. 1 Share this post Link to post Share on other sites