Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
aussiedelta

Radio

Recommended Posts

Heyo guys was just looking around for some sort of radio script for an ambient music kinda thing, If anyone can help me out that would be MUCH appreciated.

Share this post


Link to post
Share on other sites

I've got the same question here:

http://forums.bistudio.com/showthread.php?165640-Customize-music-sound-to-Radios

It used to work in Arma 2. I've got a few campaigns to prove it.

Old school way was:

description.ext

// ======================
// class CfgSFX related
// ======================
class CfgSFX
{
class EasternEggs
{
	sounds[] = {"sound1"};
	name = "radio";
	sound1[] = {"Sounds\radio.ogg", 2.51189, 1, 20, 1, 0.0, 0.0, 0.0};
	empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
};


};

My "radio.ogg" is a radio broadcast from China I downloaded from the net.

Next was to place the radio down on the map. Name it: RADIO

Next is to set up the Trigger:

NAME: trgMusic

TYPE: None

ACTIVATION: None

ONCE

PRESENT

Condition: TRUE

On Act: trgMusic attachTo [RADIO,[0,0,1]];

EFFECTS: TRIGGER----->radio

Did not work.

If you find the answer before me, please be sure to post it here in detail

Cheers

Share this post


Link to post
Share on other sites

Sorry mate, I thought I answered this for you but I mustn't have hit the post button.

MY mod TPW MODS actually has both ambient radio and ambient music. Ambient radio uses the inbuilt radio sounds, the music was some Greek music I scrounged off the interweb. I packed the music up into a pbo, but it would work if you had the files in your mission directory too. Just replace TPW_SOUNDS as appropriate

class CfgMusic
{
tracks[]={};

	class greekmusic1
{
	name = "greekmusic1";
	sound[] = {"\TPW_SOUNDS\music\1.ogg", db+10, 1.0};
};

	class greekmusic2
{
	name = "greekmusic2";
	sound[] = {"\TPW_SOUNDS\music\2.ogg", db+10, 1.0};
};

etc up to greekmusic15

};

I currently set the music to play in a random house, but you could easily assign it to a radio. Say you place a survival radio in the editor and give it the name radio.

Then create a trigger and put this in its on act

playsound3d [format ["TPW_SOUNDS\music\%1.ogg",floor random 16],radio,true,getposasl radio,1,1,25]

If you wanted the radio to just play ambient military chatter then use

playsound3d [format ["A3\Sounds_F\sfx\radio\ambient_radio%1.wss",floor (random 31)],radio,true,getposasl radio,1,1,25]

I hope this helps get you started

Share this post


Link to post
Share on other sites

Greetings tpw!

I think players would like to customize this to play their own music/sound files.

If I use your method as shown, it seems that I also will need your TPW_SOUND pbo (which is great btw for the GREEK and MILITARY chatter/music!).

I renamed my ogg file as "chinachatter" to save confusion (was originally "radio.ogg").

So, moments ago, I set up the description.ext like this, and did all Cfg just in case:

class CfgMusic
{
   tracks[]={chinachatter};

       class chinachatter
   {
       name = "chinachatter";
       sound[] = {"\Music\chinachatter.ogg", db+10, 1.0};
   };


};  

class CfgSounds
{
sounds[] = {sheet,chinachatter};

class sheet
 	{
  	name = "sheet";
  	sound[] = {"\Sounds\sheet.ogg", 1, 1};
  	titles[] = {};
 	};

class chinachatter
 	{
  	name = "chinachatter";
  	sound[] = {"\Sounds\chinachatter.ogg", 1, 1};
  	titles[] = {};
 	};

};

// ======================
// class CfgSFX related
// ======================
class CfgSFX
{
class EasternEggs
{
	sounds[] = {"sound1"};
	name = "chinachatter";
	sound1[] = {"Sounds\chinachatter.ogg", 2.51189, 1, 20, 1, 0.0, 0.0, 0.0};
	empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
};


};

I have your code set like this for the Trigger:

playsound3d [format ["\Music\chinachatter.ogg",floor random 16],radio,true,getposasl radio,1,1,25]

Condition set at: this...............I'll go back in at test it as "this" and next as "true".

Will test with all the EFFECTS in the Effects pull down to see what happens and report back here soon.

Thank you for your help on this. Much appreciated!

EDIT=================================

OK, tested each EFFECTS and made sure to save each and every time.

This is what I got:

Anonymous: nothing

Voice: military chatter in English--->strange, should have been the Mandarin file

Trigger: nothing

Track: military chatter in English--->strange, should have been the Mandarin file

So as you can see, we are half-way there.

The "chinachatter.ogg" file is a Mandarin radio broadcast.

I've got Survival radio set on a table that is in PLO_Opfor control, therefore, I need Mandarin custom ogg file for this.

Any ideas to alter the script you provided?

Edited by Kommiekat

Share this post


Link to post
Share on other sites
Greetings tpw!

I think players would like to customize this to play their own music/sound files.

If I use your method as shown, it seems that I also will need your TPW_SOUND pbo (which is great btw for the GREEK and MILITARY chatter/music!).

I renamed my ogg file as "chinachatter" to save confusion (was originally "radio.ogg").

So, moments ago, I set up the description.ext like this, and did all Cfg just in case:

class CfgMusic
{
   tracks[]={chinachatter};

       class chinachatter
   {
       name = "chinachatter";
       sound[] = {"\Music\chinachatter.ogg", db+10, 1.0};
   };


};  

class CfgSounds
{
sounds[] = {sheet,chinachatter};

class sheet
 	{
  	name = "sheet";
  	sound[] = {"\Sounds\sheet.ogg", 1, 1};
  	titles[] = {};
 	};

class chinachatter
 	{
  	name = "chinachatter";
  	sound[] = {"\Sounds\chinachatter.ogg", 1, 1};
  	titles[] = {};
 	};

};

// ======================
// class CfgSFX related
// ======================
class CfgSFX
{
class EasternEggs
{
	sounds[] = {"sound1"};
	name = "chinachatter";
	sound1[] = {"Sounds\chinachatter.ogg", 2.51189, 1, 20, 1, 0.0, 0.0, 0.0};
	empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
};


};

I have your code set like this for the Trigger:

playsound3d [format ["\Music\chinachatter.ogg",floor random 16],radio,true,getposasl radio,1,1,25]

Condition set at: this...............I'll go back in at test it as "this" and next as "true".

Will test with all the EFFECTS in the Effects pull down to see what happens and report back here soon.

Thank you for your help on this. Much appreciated!

I used my sounds just as an illustration kk, hence: Just replace TPW_SOUNDS as appropriate

Assuming your ogg is in a Music directory inside your mission directory then all you need is

class CfgMusic
{
   tracks[]={chinachatter};

       class chinachatter
   {
       name = "chinachatter";
       sound[] = {"Music\chinachatter.ogg", db+10, 1.0};
   };
};

and all you need in your trigger is

playsound3d ["Music\chinachatter.ogg",radio,true,getposasl radio,1,1,25]

Share this post


Link to post
Share on other sites

BINGO!!

You're my HERO! Can I call you--->Hunky man? ;)

Got it to work.

Should be EFFECTS--->Trigger, using your code in post #5.

The volume is a bit low, but I think I can work on that.....maybe.

You can consider this a major break through in A3 scripting for mission editing.

Perhaps Kalynia could put this on his web page as an archeive.

Thanks for your help!

KK

Share this post


Link to post
Share on other sites
BINGO!!

You're my HERO! Can I call you--->Hunky man? ;)

Got it to work.

Should be EFFECTS--->Trigger, using your code in post #5.

The volume is a bit low, but I think I can work on that.....maybe.

You can consider this a major break through in A3 scripting for mission editing.

Perhaps Kalynia could put this on his web page as an archeive.

Thanks for your help!

KK

My pleasure KK.

You can always make the sound louder eg:

playsound3d ["Music\chinachatter.ogg",radio,true,getposasl radio,2,1,25]

Share this post


Link to post
Share on other sites
BINGO!!

You're my HERO! Can I call you--->Hunky man? ;)

Got it to work.

Should be EFFECTS--->Trigger, using your code in post #5.

The volume is a bit low, but I think I can work on that.....maybe.

You can consider this a major break through in A3 scripting for mission editing.

Perhaps Kalynia could put this on his web page as an archeive.

Thanks for your help!

KK

Kommiekat a demo example please, i try all but not work for my :confused:

EDIT: I received your PM thank you so much Kommiekat

Edited by Thor632

Share this post


Link to post
Share on other sites
Sign in to follow this  

×