Page MenuHomeFeedback Tracker

[EventHandler] make "HandleDamage" giving the correct selection which have been hit (like "HitPart")
Assigned, WishlistPublic

Description

"HandleDamage" is currently only giving a bad selection of hit parts to the event code ("Legs", "Hands", "Head", "Body")
This is OK for most things but at that point when you want to detect if the LEFT leg was hit, youre not able to do so.

Normaly for this "HitPart" would be the solution but according to the community wiki "HitPart":
Runs when the object, it was added to, gets injured/damaged. It returns the position and component that was hit on the object within a nested array, this is because the model may have more than selection name for the hit component.
While you can add "HitPart" handler to a remote unit, the respectful addEventHandler command must be executed on the shooter's PC and will only fire on shooter's PC as well. Additionally, if the unit gets damaged by any means other than shooter's shooting, "HitPart" will not fire. Because of this, this event handler is most suitable for when the shooter needs feedback on his shooting, such as target practicing or hitmarker creation.

"HitPart" is not a good solution for such a thing (MP mission)

So please do something
Fix "HitPart" in that part or extend "HandleDamage"

Details

Legacy ID
4158994418
Severity
None
Resolution
Open
Reproducibility
Have Not Tried
Category
Scripting
Steps To Reproduce

Place a (group of) soldier(s) and assign

this addEventHandler ["handledamage", { hintSilent format ["T=%1 : %2", time, _this];}]

to the init and shoot them at different places of the body.

For comparison try:

this addEventHandler ["hitpart", { hintSilent format ["T=%1 : %2", time, _this];}]

Event Timeline

X39 edited Steps To Reproduce. (Show Details)Dec 7 2013, 8:48 PM
X39 edited Additional Information. (Show Details)
X39 set Category to Scripting.
X39 set Reproducibility to Have Not Tried.
X39 set Severity to None.
X39 set Resolution to Open.
X39 set Legacy ID to 4158994418.May 7 2016, 5:34 PM
X39 edited a custom field.
X39 added a subscriber: X39.May 7 2016, 5:34 PM
X39 added a comment.Dec 23 2013, 5:46 PM

as i dont want to open another ticket i will add this here to this ticket as comment (please say if i shall open another ticket for this)

The EventHandler is fired for zones which where not hit!
As you can see on this output of a HandleDamage, {"diag_log _this"} EH (HeadShot, middle of head from back):

"[B Alpha 2-1:1,"head",5.66726,<NULL-object>,"B_65x39_Caseless"]"
"[B Alpha 2-1:1,"",0.406582,B Alpha 1-1:1 (Cpt. HM Murdock),"B_65x39_Caseless"]"
"[B Alpha 2-1:1,"",0.856582,B Alpha 1-1:1 (Cpt. HM Murdock),"B_65x39_Caseless"]"
"[B Alpha 2-1:1,"head",6.11726,B Alpha 1-1:1 (Cpt. HM Murdock),"B_65x39_Caseless"]"
"[B Alpha 2-1:1,"body",0.454324,B Alpha 1-1:1 (Cpt. HM Murdock),"B_65x39_Caseless"]"
"[B Alpha 2-1:1,"hand_l",0.459766,B Alpha 1-1:1 (Cpt. HM Murdock),"B_65x39_Caseless"]"
"[B Alpha 2-1:1,"leg_l",0.450194,B Alpha 1-1:1 (Cpt. HM Murdock),"B_65x39_Caseless"]"

as you can see
there are zones fired which are not even hit! (like leg_l)
This results in giant problems when resolving the output of the HandleDamage EH

please fix this asap ^^
thx
X39

As of 1.08, for me, the damage returned from EH HD is way off (always 0.00x) and as hit zone I always get "leg_l" or if I'm lucky "legs".

By reason my other ticket was closed as duplicate of this here comes some further notes to the problem i had described in my closed ticket:

In dependence from damage source and in dependence from the first hit to all following hits the damage EVH bring different values back.

main problems:

  • a new output, overall damage at the first hit, only by grenades
  • NULL output for the damage source at every damage event (first output)
  • changing frame during a event (against the notes wiki)
  • a different damage output after the frame has changed

With this "undefined/changing" output values it is very hard for mission designer or modder to work with this event.

mission start - damge only trough grenades:
first hit:
"Frame: 273797: [p1,"head",0.299985,<NULL-object>,"GrenadeHand"]" <--- NULL?!
"Frame: 273797: [p1,"",0.73864,Shooter,"GrenadeHand"]"
"Frame: 273797: [p1,"",0.73864,Shooter,"GrenadeHand"]"
"Frame: 273797: [p1,"head",0.299985,Shooter,"GrenadeHand"]"
"Frame: 273797: [p1,"body",0.171576,Shooter,"GrenadeHand"]"
"Frame: 273797: [p1,"hands",0.29755,Shooter,"GrenadeHand"]"
"Frame: 273797: [p1,"legs",0.35811,Shooter,"GrenadeHand"]"
"Frame: 273804: [p1,"",0.739428,Shooter,""]" <--- overall damage in another frame
// second hit:
"Frame: 275578: [p1,"head",0.351021,<NULL-object>,"GrenadeHand"]" <--- NULL?!
"Frame: 275578: [p1,"",0.105894,Shooter,"GrenadeHand"]"
"Frame: 275578: [p1,"",0.845322,Shooter,"GrenadeHand"]"
"Frame: 275578: [p1,"head",0.351021,Shooter,"GrenadeHand"]"
"Frame: 275578: [p1,"body",0.199912,Shooter,"GrenadeHand"]"
"Frame: 275578: [p1,"hands",0.346067,Shooter,"GrenadeHand"]"
"Frame: 275578: [p1,"legs",0.413056,Shooter,"GrenadeHand"]"
??? <--- where is it?! summary output only at the first hit?

mission start - damage trough bullets in the torso/body (same distance):
first hit:
"Frame: 299633: [p1,"head",0.0156636,<NULL-object>,"B_65x39_Caseless"]" <--- NULL?!
"Frame: 299633: [p1,"",0.316172,Shooter,"B_65x39_Caseless"]"
"Frame: 299634: [p1,"",0.316172,Shooter,"B_65x39_Caseless"]" <--- a new frame started: the output above start twice
"Frame: 299634: [p1,"head",0.0156636,Shooter,"B_65x39_Caseless"]"
"Frame: 299634: [p1,"body",0.505136,Shooter,"B_65x39_Caseless"]"
"Frame: 299634: [p1,"hands",0.0790496,Shooter,"B_65x39_Caseless"]"
??? <--- where is it?! no summary output but its the first hit
// second hit:
"Frame: 300118: [p1,"head",0.0406294,<NULL-object>,"B_65x39_Caseless"]" <--- NULL?!
"Frame: 300118: [p1,"",0.857814,Shooter,"B_65x39_Caseless"]"
"Frame: 300119: [p1,"",1.17399,Shooter,"B_65x39_Caseless"]" <--- a new frame started: the output above start twice but now with a different damage?!
"Frame: 300119: [p1,"head",0.0406294,Shooter,"B_65x39_Caseless"]"
"Frame: 300119: [p1,"body",0.589541,Shooter,"B_65x39_Caseless"]"
"Frame: 300119: [p1,"hands",0.164116,Shooter,"B_65x39_Caseless"]"
??? <--- again nothing...

Example mission is attached here: http://feedback.arma3.com/view.php?id=15948

The issue is still existing for cars

confirmed! Source (_this select 3) is returned as (driver (vehicle (_this select 0)))
really badass -_-