Home   Help Search Login Register  

Author Topic: addeventhandler "hit" or "killed" query  (Read 1183 times)

0 Members and 1 Guest are viewing this topic.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
addeventhandler "hit" or "killed" query
« on: 24 May 2003, 10:19:38 »
player addeventhandler [{Killed},
or
player addeventhandler [{hit},

*****************************************************************
 :gunman:Please tell me if my understanding of these eventhandlers is correct!

******************************************************************

In both cases, when the event occurs, an array containing 2 elements is created locally on the "Damaged" players machine

select 0 is the damaged player
select 1 is the player doing the damage
**********************************************************************

Just some clarification please.

Thx in advance

******************************************************************
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

deaddog

  • Guest
Re:addeventhandler "hit" or "killed" query
« Reply #1 on: 24 May 2003, 16:33:08 »
I know for sure about the "killed" handler.

_this select 0 is player
_this select 1 is killer

Interesting thing.  If you kill yourself, then you are the killer.  If you are killed by a shell or mine,etc then the killer is null.

_killer=_this select 1
hint format ["%1",name _killer]

will equal "Error: No Vehicle" or something like this.

I assume "hit" works in a similar way.   :)

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:addeventhandler "hit" or "killed" query
« Reply #2 on: 24 May 2003, 18:43:45 »
"Hit"

done some testing on this

Hit only works iff player is wounded, if player is killed then it doesnt see this as a "hit" event

try it, shoot a player in the leg, then  wound him some more, have a hint box activated each time, when the player is killed on the addeventhandler "hit" the hint box wont show
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

hurlothrumbo

  • Guest
Re:addeventhandler "hit" or "killed" query
« Reply #3 on: 24 May 2003, 20:08:35 »
also beware that a hit event handler can activate multiple times on one shot iff different hitboxes get hit.