Jump to content
Jimmakos

[Help] Make radio play a custom sound/chatter.

Recommended Posts

Hi,

 

Im trying to make the small survival FM radio play a custom sound something like a news chatter.

I'm really new at this and i want some help or guiding because it seems really hard for me.

I've already placed the custom sound on my mission root folder as of \sound\filename.ogg.

I dont know what excactly to type in my description.ext, what excactly to use CfgMusic,CfgSounds? and checking the bis wiki on how to do it gives me a headache.

I want to make the FM radio emits the sound when the player reach the place where the radio is located,so a trigger with a 15-25m radius which is activated by the player and if its possible the sound fade when the players get away,i dont really like to make a trigger playing the sound,but the radio itself.

 

I would apreciate any kind of help.

Share this post


Link to post
Share on other sites

Is it something like this your trying to achieve.....

 

 

Within my mission root folder I have a "sound" folder, within my "sound" folder I have a .ogg file named OutbreakRadio1.

 

In my description.ext 

class CfgSFX
{
	sounds[] = {};

	class OutbreakRadio1
	{
		name = "OutbreakRadio1";
		sounds[]={sfxsound};
		sfxsound[]={"sound\OutbreakRadio1.ogg",10,1,18,1,1,1,0};
		empty[]= {"",0,0,0,0,0,0,0};
	};
};

In the editor I place a rectangle trigger (size 5x5) over the radio on the camp table.

Trigger Activation - Blufor, Present, Repeatable

Trigger Expression - leave blank

Trigger Effect - select your custom sound from the SFX box, in my case it's "OutbreakRadio1"

 

I have no doubt there are more efficient ways of achieving the result you require, but this works for me in SP.

I hope all or some of this helps.  :)

  • Like 4

Share this post


Link to post
Share on other sites

 

I hope all or some of this helps.  :)

 

Thanks i got this working eventually since playsound3D wasnt working at all for me.

i also added in the trigger 1 fadeMusic 1; on act and 3 fadeMusic 0; on deactivation.

I also want to add a new chatter for the long radio recievers do you know how to add another class for my second audio file?

I tried this but within the sfx bar on the trigger effect i dont get the "transchatter" classname.

class CfgSFX
{
    sounds[] = {newschatter,transchatter};
 
    class newschatter
    {
        name = "newschatter";
        sounds[]={sfxsound};
        fxsound[]={"sounds\news_FMradio.ogg",1,1,14,1,1,1,0};
        empty[]= {"",0,0,0,0,0,0,0};
    };
};
    class transchatter
    {
       name = "transchatter";
       sounds[]={sfxsound};
       sfxsound[]={"sounds\Bosnian_chatter.ogg",1,1,14,1,1,1,0};
       empty[]= {"",0,0,0,0,0,0,0};
    };
};

Share this post


Link to post
Share on other sites

You have a bracket and semi-colon to many,  just before the "class transchatter" line,  try this instead. 

class CfgSFX
{
    sounds[] = {newschatter,transchatter};
 
    class newschatter
    {
        name = "newschatter";
        sounds[]={sfxsound};
        fxsound[]={"sounds\news_FMradio.ogg",1,1,14,1,1,1,0};
        empty[]= {"",0,0,0,0,0,0,0};
    };

    class transchatter
    {
       name = "transchatter";
       sounds[]={sfxsound};
       sfxsound[]={"sounds\Bosnian_chatter.ogg",1,1,14,1,1,1,0};
       empty[]= {"",0,0,0,0,0,0,0};
    };
};
  • Like 1

Share this post


Link to post
Share on other sites

 

You have a bracket and semi-colon to many,  just before the "class transchatter" line,  try this instead. 

 

 

Thanks a bunch mate! ,you've been really helpfull,sended you a PM for another question concerning Ravage mod and a small issue i have since i dont really want to threadjack this one.

  • Like 1

Share this post


Link to post
Share on other sites
On 3/27/2016 at 4:04 PM, EO said:

 

 

 

 

Within my mission root folder I have a "sound" folder, within my "sound" folder I have a .ogg file named OutbreakRadio1.

 

In my description.ext 


class CfgSFX
{
	sounds[] = {};

	class OutbreakRadio1
	{
		name = "OutbreakRadio1";
		sounds[]={sfxsound};
		sfxsound[]={"sound\OutbreakRadio1.ogg",10,1,18,1,1,1,0};
		empty[]= {"",0,0,0,0,0,0,0};
	};
};

In the editor I place a rectangle trigger (size 5x5) over the radio on the camp table.

Trigger Activation - Blufor, Present, Repeatable

Trigger Expression - leave blank

Trigger Effect - select your custom sound from the SFX box, in my case it's "OutbreakRadio1"

 

I have no doubt there are more efficient ways of achieving the result you require, but this works for me in SP.

I hope all or some of this helps.  🙂

 

 

I hate bringing up dead posts but I need some clarification on this one. I got it to work in the editor, what I am trying to do is fine tune it. I would like it to play a bit farther away. What numbers to I modify in that .ext file to get it to be a little louder while still a little farther away? I am using loudspeakers so they should "obviously" be heard at a greater distance

Share this post


Link to post
Share on other sites
21 minutes ago, MCSheaG said:

I hate bringing up dead posts but I need some clarification on this one. I got it to work in the editor, what I am trying to do is fine tune it. I would like it to play a bit farther away. What numbers to I modify in that .ext file to get it to be a little louder while still a little farther away? I am using loudspeakers so they should "obviously" be heard at a greater distance

 

Hey there, so taking the above description.ext as an example, the numbers relating to sfxsound are as follows...

sfxsound[]={"sound\OutbreakRadio1.ogg",10,1,18,1,1,1,0};

Where 10 is soundVolume, 1 is soundPitch, 18 is maxDistance, 1 is probability, 1 is minDelay, 1 is midDelay, 0 is maxDelay

 

I think for your purpose you need to edit maxDistance.

 

This wiki page might help too. https://community.bistudio.com/wiki/CfgSFX 

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

×