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: adding a sound when hit  (Read 630 times)

0 Members and 1 Guest are viewing this topic.

BHD Mod

  • Guest
adding a sound when hit
« on: 15 May 2005, 08:13:51 »
is there a way i could make it so that everytime a person is hit they play a sound (a scream)? i know it has something to do with "addeventhandler" but i have no idea how to use it.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:adding a sound when hit
« Reply #1 on: 15 May 2005, 09:48:23 »

Go to the Editors Dept - Online References - Scripting Topics - Event Handlers.

Also look at
http://www.ofpec.com/editors/resource_view.php?id=543

« Last Edit: 15 May 2005, 09:48:55 by THobson »

Offline 456820

  • Contributing Member
  • **
Re:adding a sound when hit
« Reply #2 on: 15 May 2005, 10:46:47 »
i thought ofp soldiers scream already when hit well most of the time they do

Offline Roni

  • Members
  • *
  • Play the Game !
Re:adding a sound when hit
« Reply #3 on: 18 May 2005, 23:45:37 »
They do, but they're pretty lame.  I finally learned EH's a few months ago after years of playing OFP and have hade heaps of fun lately adding "hit" and "fired" EHs' to all and sundry.

I now have custom sounds, custom blood, custom gun smoke, custom rocket trails etc.  Needless to say I can't make a playable mission with all this laggy smoke and custom sound effects clogging up the CPU !   ;D   :P



Rags