Home   Help Search Login Register  

Author Topic: EH "dammage" bug?  (Read 883 times)

0 Members and 1 Guest are viewing this topic.

exodus400

  • Guest
EH "dammage" bug?
« on: 17 Sep 2004, 23:51:29 »
I get two different return values from the same unit. The getDammage return is 0.2 lower than the EH return. Strange?

"_x addEventHandler [{dammaged}, {_this exec {hit.sqs}}]" forEach firstsq

hit.sqs:

_hit = _this select 0
_bodypart = _this select 1
_dammage = _this select 2

aP sidechat Format["Dam:%1 Dam:%2",_dammage,getDammage _hit]

exodus400

  • Guest
Re:EH "dammage" bug?
« Reply #1 on: 19 Sep 2004, 01:17:53 »
Hmm, the EH "dammage" seems to report a damage value done to the body part hit, not the unit's overall damage. Do anyone know how this works in detail? Or am I completely wrong?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:EH "dammage" bug?
« Reply #2 on: 19 Sep 2004, 02:11:21 »
There was a thread about this the other day, search the forum.
Plenty of reviewed ArmA missions for you to play

exodus400

  • Guest
Re:EH "dammage" bug?
« Reply #3 on: 21 Sep 2004, 18:27:00 »
Have searched. Couldn't find anything. Out.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:EH "dammage" bug?
« Reply #4 on: 25 Sep 2004, 02:24:36 »
I tried to figure this one out once, but failed miserably. I made tables and everything, trying with different weapons and all... lets just say, I have no idea :). I suspect it has something to do with the different armor values in a unit's config (there are separate values for damage area, as well as an overall armor value), but I can't see any simple relation. Or the relation between bullet damage values and armor values, and getdammage values. All I know is that OFP seems to 'cheat' with headshots; meaning they will almost always kill a unit, even though getdammage or the dammaged EH will return a very low value.

A while ago, I wanted to reconfigure the 'man' class, so that the 'getdammage' command would work better. As it is now, it isn't an accurate way to tell how hurt a unit is. One headshot, and getdammage will return like 0.1, but the unit is dead. It takes lots of leg shots to kill a unit, but afterwards getdammage will return like 0.8. Arm and chest shots are somewhere in between. I wanted to change the armor values so that, for example, one headshot would make getdammage return 1.0, and one legshot would be something very low.

Anyway, I did a little research into the area, including using the 'dammaged' EH. And like I said, I failed miserably. Or more like, went insane. I guess it would be possible to figure out the relation between all these (armor values, getdammage, dammaged EH, ammo damage values), but it would take someone much smarter or much more patient than myself.

So anyway, I can't help you much more than that. You're musings are basically what I suspect as well, and if you add to that the info I rambled a couple of paragraphs up, you've got all I can tell you about it. I guess check my comment at the bottom of Igor Drukov's EH tutorial, because it talks about another little quirk with the dammaged EH. It might give you some more ideas... but basically, I hate the dammaged EH :).


HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

exodus400

  • Guest
Re:EH "dammage" bug?
« Reply #5 on: 26 Sep 2004, 18:59:45 »
Thanks for your reply. I guess I will have to use the "hit" EH. I guess it returns the units total damage?

BTW nice combat patrol mission!