Jump to content
Sign in to follow this  
oldpz

add custom sound

Recommended Posts

I'm trying to add a custom sound inside my mission , i have used the description wizard and I have used the command playSound"soundname" why it doesn't work?

Share this post


Link to post
Share on other sites
why it doesn't work?

because you did something wrong..

what you did wrong, how can we guess?

post proper or expect no replies.

Share this post


Link to post
Share on other sites
I'm trying to add a custom sound inside my mission , i have used the description wizard and I have used the command playSound"soundname" why it doesn't work?

You must convert your sound file into OGG format using something like OGGDropxpd. Then it should work. OGGDropxpd will not work with mp3 files though. Make sure "soundname" is a wav file to start out with, drag and drop the wav file into OGGDropxpd. You should then have a file named soundname.ogg. Place this into your mission directory and use the command:

unit1 say "Soundname"

Instead of "playsound".

Share this post


Link to post
Share on other sites

Hi Oldpz,

See link below:-

http://ofp.toadlife.net/downloads/tutorials/tutorial_sound/tutorial_sound.html

I added some music by adding the following to the description.ext file:-

#include "Cust_scripts\Sounds\Music\Music.cpp"

And created a file called music.cpp with the following code:-

class CfgMusic

{

// ====================================================================================

// The next line defines what tracks you are going play within the mission.

tracks[]={M_TRACK01};

// ====================================================================================

//The next line defines the class name as listed above.

class M_TRACK01

{

// The next line is used so that you can find the track in the effects of a trigger.

name="M_TRACK01 (Paint It Black)"; // Name for mission editor

// The next like is shows where the track is stored followed by the sound level and pitch.

sound[]={"Cust_scripts\Sounds\Music\M_TRACK01_Paint It Black.ogg",db+10,1.0};

// The db-40 refers to the volume of the sound.

// The 1.0 refers to the pitch of the sound.

};

};

// ====================================================================================

Hope this helps.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×