frantic69 1 Posted January 3, 2014 Hello all, I ask your help today for the HandleDamage event handler. I made a simple mission : one single unit as target (called kenny) and the player of course. I have a simple script : _this addEventHandler [ "HandleDamage", { hint format ["%1", _this select 1]; } ]; I call it via the init of Kenny : null = this execvm "damage.sqf"; Every time I shoot Kenny I have a feedback. The problem is that the only message I have is "legs". No matter where I shot, only "legs". Do you have an idea of why I only got this "legs" message and not "head_hit", "body" or "hands" ? Thank you Share this post Link to post Share on other sites
iceman77 18 Posted January 3, 2014 I haven't used it, but what about hitPart instead? Or it may be an issue with Arma3 itself. Share this post Link to post Share on other sites
frantic69 1 Posted January 3, 2014 Thank you Iceman77. I made a quick trying but I only got "null" feedback with the hitpart handler. Maybe I am doing something wrong. Share this post Link to post Share on other sites
iceman77 18 Posted January 3, 2014 Apparently handleDamage is having issues with the selection parameter atm. http://feedback.arma3.com/view.php?id=16460. Also, the selection for hitPart is returning null for me too (with an error). Share this post Link to post Share on other sites
frantic69 1 Posted January 3, 2014 I think I am doing something wrong with the array. Because Hitpart return an Array for the selection and not a string as Handledamage is doing. I use hint toString [(_this select 5)]; to show the array of the 5th element of hitpart but I am sure that tostring is not the good way to show an array. Sorry I am good at arma scripting. ---------- Post added at 17:26 ---------- Previous post was at 17:22 ---------- excuse me, I answered just before I refresh and saw your reply. Ok, it seems that Handledamage doesn't work. I will try to make the hitpart working ---------- Post added at 17:38 ---------- Previous post was at 17:26 ---------- so, when I use this command in the Hitpart handler (the one in the feedback link you have provided) : hintSilent format ["T=%1 : %2", time, _this]; It works fine but I have the full hitpart report with all the information. I will try to only have the selection (param #5). Thank you Share this post Link to post Share on other sites
Larrow 2810 Posted January 3, 2014 (edited) Do you have an idea of why I only got this "legs" message and not "head_hit", "body" or "hands" ?The EH fires multiple times for each selection hit, as you are using hint the previous hints are being replaced by the last one which is legs (they are displaying but being replaced so quickly you do not notice). Try using player sidechat or log to the RPT instead so you can see all the returns from the EH firing.The HitPart selection is ((_this select 0) select 5) and select 0 again if you only want to extract the string. Although it is possible you could get multiple selections listed here. [ [ B Alpha 1-1:2, B Alpha 1-1:1 (Dev), 163985: tracer_red.p3d, [1855.8,5563.03,6.79108], [326.898,-353.206,-17.2408], ["spine3"], [10,0,0,0,"B_65x39_Caseless"], [-0,-0,-1], 0.220345, "A3\data_f\Penetration\meatbones.bisurf",true ] ] Edited January 3, 2014 by Larrow Share this post Link to post Share on other sites
frantic69 1 Posted January 3, 2014 Thank you Larrow, the ((_this select 0) select 5) works fine. I can have the feedback of the impacted area of the target and show it only on the screen. Thank you guys for your help. I will play a lot with this parameters to train myself. Thank you Share this post Link to post Share on other sites