OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: rgordon 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.
-
This might works
PersonWhoWasKilled unit1 addEventHandler["killed",{PersonWhoDidTheKilling=_killer}]
personwhowaskilled is the unit that will be killed
personwhodidthekilling would be the person who killed unit1.
-
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
-
no, you just put it in init of the unit that he wants to be killed.