Jump to content
Sign in to follow this  
blackmamb

HandleHeal event Handler. (How) does it work?

Recommended Posts

So, I knew the HandleHeal was pretty much broken.

But now, I'm not even sure to understand how it's supposed to work. If anybody's familiar with it, afew clarifications would be much appreciated.

So, I can get it to fire, (almost) no problem (it fires only if assigned to the unit getting healed, and does not work when a unit is healing itself, and also the third returned value is always false), and executes all kinds of code.

But is there a way to actually manipulate the way the healing is done?

For example, if I assign an eventHandler that only does setdammage 0.3, the unit getting healed will be set to 0.3, until the healing is done. Then engine side healing is applied.

setAIS [true];
fa_mmfn_handleHeal = {
_unit = _this select 0;
_healer = _this select 1;
player sidechat str(_this);
_unit setdamage 0.333;
AISFinishHeal [_unit, _healer, true];
true
};

testeh = dude addEventHandler ["HandleHeal", {_this call fa_mmfn_handleHeal}];

nul = [] spawn {   while {true} do {    HintSilent format ["%1", getdammage dude];    sleep 0.1;   };  };

There are to commands that seemed relevant to me: AISFinishHeal and setAIS, although none of them seem to do anything. Am I missing something, or should another ticket be created?

Edit: By the way, I do have a working workaround to this. I'm just curious to see if it's just me not understanding properly how this works.

Edit some more: Also, the fact that it does work as inteded when using setdamage 0 makes me think the AISFinishHeal command is broken.

Edited by BlackMamb

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  

×