Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: fired and hit  (Read 1267 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
fired and hit
« 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?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: fired and hit
« Reply #1 on: 07 Feb 2007, 17:12:51 »
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.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: fired and hit
« Reply #2 on: 07 Feb 2007, 22:07:45 »
er... what?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: fired and hit
« Reply #3 on: 07 Feb 2007, 23:10:44 »
Init field of bad guy:
Code: [Select]
this addeventhandler ["Killed", {_this exec "isdead.sqs"}]
isdead.sqs
Code: [Select]
_killer = _this select 1
?group _killer == group player: _killer say "yoursound"