Home   Help Search Login Register  

Author Topic: Detect who killed unit  (Read 502 times)

0 Members and 1 Guest are viewing this topic.

rgordon

  • Guest
Detect who killed unit
« on: 26 Mar 2003, 21:47:17 »
I need to detect who killed a specific unit and assign the unit name to a variable.

If this has been covered in another thread, can you please give me a link.

Thanks in advance for any help.

imemyself

  • Guest
Re:Detect who killed unit
« Reply #1 on: 05 May 2003, 02:00:44 »
This might works
Code: [Select]
PersonWhoWasKilled unit1 addEventHandler["killed",{PersonWhoDidTheKilling=_killer}]


personwhowaskilled is the unit that will be killed
personwhodidthekilling would be the person who killed unit1.

« Last Edit: 05 May 2003, 02:02:14 by imemyself »

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Detect who killed unit
« Reply #2 on: 05 May 2003, 19:33:15 »
I'm sorry, but that would mean you'd have to script that line before you'd even know who would kill who, wouldn't you ?  :P

hurlothrumbo

  • Guest
Re:Detect who killed unit
« Reply #3 on: 06 May 2003, 12:34:02 »
no, you just put it in init of the unit that he wants to be killed.