Jump to content
Sign in to follow this  
Griggs

CfgSound not working

Recommended Posts

The title is quite descriptive, really. I put this code in the description.ext file:

class CfgSounds
{
sounds[]={Akbar1};
class Akbar1 {
 name="Oorah!";
 sound[]={"sound\akbar1.ogg", db+50, 1.2};
 titles[]= {0, $STRM_AKBAR};
};
};

There's a file called Akbar.ogg in the Griggs\Sound folder, and a stringtable (CSV) in the mission folder.

The only result of triggering this (either via Effects-Voice or playsound) is that the title "Akbar!" is showed on-screen, which makes me think that the error should be in the sound[] line. I think.

Could someone please help me to correct this code?

Thanks in advance;

Griggs

Share this post


Link to post
Share on other sites

If it's in griggs\sound folder then the directory is wrong. Unless I'm mistaken It should be like:

class CfgSounds 
{  
sounds[]={Akbar1}; 
class Akbar1 {  
 name="Oorah!";   
 sound[]={"griggs\sound\akbar1.ogg", db+50, 1.2};  
 titles[]= {0, $STRM_AKBAR};

   };

};

but i don't mess with sound files so idk...

Edited by Iceman77

Share this post


Link to post
Share on other sites

The game automatically starts the search inside the mission folder (so YourMission.Takistan for example) and then goes to the directory where you pointed it (since sound isn't the first directory it's not automatically going to find it). So Iceman's thing should work.

Share this post


Link to post
Share on other sites

Thanks for replying, but this doesn't seem to be working.... :(

Share this post


Link to post
Share on other sites

personally i use the description file to state

#include "sounds\config.cpp"

then create a file called config.cpp in your sounds folder within the missions folder.

within that sounds folder place allahakbar.ogg - or whatever you have called it.

config.cpp

class CfgSounds
{
sounds[] = 
{
};


class  SuicideRun
{
	name="SuicideRun";
	sound[]={"sounds\allahakbar.ogg",3,1};
	titles[]={};
};



};

this works fine for me - check fock suicider bombers script from this link https://dl.dropbox.com/u/17725328/Focker_Scripts/Fock_SBomb.rar

or from fockers website

Share this post


Link to post
Share on other sites

Unfortunately, still no dice.

It says it can't find the config.cpp file. If I just use "sounds\config.cpp", it searches in the mission folder, but making that "\Griggs\Sounds\config.cpp" doesn't help either.

BTW - It's not for a suicide bomber script, the "akbar" was just something I snatched off the WWW.

Share this post


Link to post
Share on other sites

post your script and ill have a look - regardless of what script it is - i just uploaded mine so you can look at it in order to copy how the scripts ran :)

Share this post


Link to post
Share on other sites
post your script and ill have a look - regardless of what script it is - i just uploaded mine so you can look at it in order to copy how the scripts ran :)

Well, the problem really is in the #include "sounds\config.cpp" bit right now... As for the original script, it's up in the first post. But you probably saw that already.

The same applies for panther's suggestion; when triggering the sound file, the text in the stringtable was actually the only thing that worked as designed ;)

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  

×