OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: macguba on 11 May 2005, 22:06:02

Title: Playing OFP sounds
Post by: macguba on 11 May 2005, 22:06:02
I'm trying to create a sound effect.   When a certain event happens, I want one of the official sounds to play.  

Now I've found the sound I want:  it's in the sound.pbo in the DTA folder.    And I know how to make a sound play if its in the sound folder.    There should be no need to copy over the sound file though, because its already in the game.   But how do I get at it?  What is the path?

My description.ext looks like this

class CfgSounds
{
        sounds[] =    {};

   class smokeLaunch
   {
      name = "smokeLaunch";
      sound[] = {"intoground.wss", db+50, 1.0};
      titles[] = {0, ""};
   };
};

What should I have in the bold section?  I've tried a few experiments but no luck.

Many thanks.
Title: Re:Playing OFP sounds
Post by: Planck on 11 May 2005, 22:19:09
Try:

"\Sound\Weapons\intoground"


Edit:

Failing that try:

"Weapons\intoground"


Planck
Title: Re:Playing OFP sounds
Post by: General Barron on 12 May 2005, 00:33:20
I don't think it is possible. This Q has been asked in one form or another in the past, and I think the answer was that there is no way to "get out" of the mission.pbo when configuring sounds in your description.ext. So basically, yes, you have to include the sound with your mission.

The only exception, of course, are sounds that are already configured (in the game's or an addon's config) to be used in game. But for sounds that aren't configured that way, I think you are SOL.

Hopefully someone will correct me and say I'm wrong, but I'm pretty sure that was the answer.
Title: Re:Playing OFP sounds
Post by: THobson on 12 May 2005, 05:15:16
Whenever I have found an official sound that I wanted I just made in to an ogg and put it in the sound folder.  Crude but effective, the files ar rarely very large.
Title: Re:Playing OFP sounds
Post by: macguba on 12 May 2005, 09:57:07
What an august group of answerers, I am most honoured.  :)

Experiments under way.

Edit:  no luck doing it directly.    Works fine with the .ogg in the usual place and the file is only 7kb which is no big deal.

Thanks all.  


Edit:  sound effect used successfully in tank smoke script (http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=23622) now on scripts beta board.