OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 07 Feb 2007, 15:24:26
-
I think.
How do I get a script written that will check if one of my team has killed a badguy and then play a sound?
Obviously I can do the sound bit but what about step one?
-
EventHandler assigned to the bad guy: "Killed" object:killer
Just check group of "killer" (_this select 1 inside assigned script), if it is your group, play your sound.
-
er... what?
-
Init field of bad guy:
this addeventhandler ["Killed", {_this exec "isdead.sqs"}]
isdead.sqs
_killer = _this select 1
?group _killer == group player: _killer say "yoursound"