Jump to content
Sign in to follow this  
stephen271276

Sound not working

Recommended Posts

Can anyone tell me what im doing wrong?

I have a file in my missions folder called "sounds"

In there ive got two ogg files....crowd and scream.

In my description.ext ive got .....

class CfgSounds

{

sounds[] = {};

class scream

{

name = "";

sound[] = {"\sound\scream.ogg", 1, 1};

titles[] = {};

};

class crowd

{

name = "";

sound[] = {"\sound\crowd.ogg", 1, 1};

titles[] = {};

};

};

But when I put <playsound "crowd" or "scream">

Nothing happens?

Share this post


Link to post
Share on other sites

Change it to this:

class CfgSounds

{

sounds[] = {};

class scream

{

name = "scream";

sound[] = {"\sound\scream.ogg", 1, 1};

titles[] = {};

};

class crowd

{

name = "crowd";

sound[] = {"\sound\crowd.ogg", 1, 1};

titles[] = {};

};

};

it's the name in the "" marks that actually matters for calling sounds in missions

Share this post


Link to post
Share on other sites

OK, got them working but any idea why the third one wont work? called "thank"?

class CfgSounds

{

sounds[] = {};

class scream

{

name = "scream";

sound[] = {"\sound\scream.ogg", 1, 1};

titles[] = {};

};

class crowd

{

name = "crowd";

sound[] = {"\sound\crowd.ogg", 1, 1};

titles[] = {};

};

};

class thank

{

name = "thank";

sound[] = {"\sound\thank.ogg", 1, 1};

titles[] = {};

};

};

Share this post


Link to post
Share on other sites

class CfgSounds

{

sounds[] = {};

class scream

{

name = "scream";

sound[] = {"\sound\scream.ogg", 1, 1};

titles[] = {};

};

class crowd

{

name = "crowd";

sound[] = {"\sound\crowd.ogg", 1, 1};

titles[] = {};

};

};

class thank

{

name = "thank";

sound[] = {"\sound\thank.ogg", 1, 1};

titles[] = {};

};

};

That extra bracket there has told the script to end at that point. Careful of those. I really recommend this program:

http://forums.bistudio.com/showthread.php?t=105860&highlight=squint

It will automatically tell you about those errors.

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  

×