Home   Help Search Login Register  

Author Topic: Play a custom sound when unit dies  (Read 1636 times)

0 Members and 1 Guest are viewing this topic.

TheGimp

  • Guest
Play a custom sound when unit dies
« on: 12 Jun 2006, 12:55:31 »
hi
i know how that i would make a trigger saying condition :not alive man
then i want a sound bite to play , how do i do this?

srk

  • Guest
Re: Play a custom sound when unit dies
« Reply #1 on: 12 Jun 2006, 13:04:52 »
Easy. Type this in your On Activation field:-

PlaySound "sound_name"

Offline Cheetah

  • Former Staff
  • ****
Re: Play a custom sound when unit dies
« Reply #2 on: 12 Jun 2006, 13:07:47 »
Make a "description.ext" in the folder of the mission (your_ofp_directory/users/your_username/missions/name_of_mission).


Code: [Select]
class CfgSounds
{
sounds[] = { };
class bite
{
name = "bite";
sound[] = {"bite.ogg", db+40, 1.0};
titles[] = {1, "" };
};
};

Save the sound as an ogg file named bite. (ogg requires a conversion, use a special program to do this)

In your mission, you can put in the On Activation field: playsound "bite"

Hope this helps and works :)
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

TheGimp

  • Guest
Re: Play a custom sound when unit dies
« Reply #3 on: 12 Jun 2006, 14:51:40 »
are you sure that was right? i copyed it into description and it didnt work
and what would i do to the descriptiuon .ext to add multiple sounds?
« Last Edit: 12 Jun 2006, 15:08:16 by cam »

srk

  • Guest
Re: Play a custom sound when unit dies
« Reply #4 on: 12 Jun 2006, 15:55:04 »
Quote
and what would i do to the descriptiuon .ext to add multiple sounds?

...
class sound1
{
name = "sound1";
sound[] = {"sound1.ogg", db+40, 1.0};
titles[] = {1, "" };
};
class sound2
{
name = "sound2";
sound[] = {"sound2.ogg", db+40, 1.0};
titles[] = {1, "" };
};

...and so on.

Offline Gogs

  • Contributing Member
  • **
  • WWIIEC - Gracefully retired boss
Re: Play a custom sound when unit dies
« Reply #5 on: 14 Jun 2006, 18:04:33 »
Quote
descriptiuon .ext

Make sure you spell it right, or it won't work. It has to be called "description.ext".

Have a folder in you mission folder called "sound" and put your sound in there...

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Play a custom sound when unit dies
« Reply #6 on: 15 Jun 2006, 11:49:37 »
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 Gogs

  • Contributing Member
  • **
  • WWIIEC - Gracefully retired boss
Re: Play a custom sound when unit dies
« Reply #7 on: 17 Jun 2006, 04:19:23 »
All about the soundtrack......

Any luck Cam dude?

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Play a custom sound when unit dies
« Reply #8 on: 17 Jun 2006, 12:36:10 »
 ;D
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."

TheGimp

  • Guest
Re: Play a custom sound when unit dies
« Reply #9 on: 26 Jun 2006, 16:36:23 »
yeh thanks i got it working no problems :)