Home   Help Search Login Register  

Author Topic: addEventHandler "Hit": Improper Documentation  (Read 519 times)

0 Members and 1 Guest are viewing this topic.

Kaja

  • Guest
addEventHandler "Hit": Improper Documentation
« on: 12 Jan 2003, 03:17:56 »
Hello,
There seems to be an error in the official ComRef in regards to addEventHandler "Hit". Seems BIS forgot to mention that there are three variables passed on instead of the documented two. What I found as the missing variable is in bold, can someone please confirm this?

"Hit" object:objectHit,object:causedBy,scalar:howMuch

Thanks all.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:addEventHandler "Hit": Improper Documentation
« Reply #1 on: 12 Jan 2003, 04:54:49 »
absolutely, all EHs return in the first field the unit they're attached to.
Dinger/Cfit

Kaja

  • Guest
Re:addEventHandler "Hit": Improper Documentation
« Reply #2 on: 12 Jan 2003, 06:03:51 »
Thx Dinger, I probably should have noticed this initially.

One quick follow up question, is there a reason the "Hit" event handler doesn't work with certain combinations of weapons and targets? Hit event isn't triggered if you have a UAZ as a target and shoot it with a rifle; even if you destroy said UAZ with rifle fire. However a grenade will set off the hit event, even if it's not a direct hit. This seems to hold true for larger vehicles as well, destroying a helo as a machine gunner doesn't set off the hit event either.

Thanks again.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:addEventHandler "Hit": Improper Documentation
« Reply #3 on: 12 Jan 2003, 19:34:02 »
"Hit" only fires when an object incurs >= 5% damage.
Dinger/Cfit