Arma 3
Playing music from a radio
Hello. I'm wondering if it's possible to play custom music from an object ie. radio. Not so that when you set off a trigger it'll play music through out the entire map. More like if you stand close to a radio, you can hear the music it's playing, but as you move away it fades out.

And, if possible, to be able to play whatever music on said radio, not just the music the game comes with. I'd think that you'd have to put an mp3(or 4, I have no idea which one is what) file into the mission folder, then set a script to play said music, as well as some other stuff. Problem is I have no idea what script to use, where to put it and how to set it up.

Thanks for all and any help.
< >
Showing 1-15 of 26 comments
Fenris 89 Aug 8, 2017 @ 1:10pm 
Yes, you mean 3D Sound!
Save the script as description.ext in your Mission folder!

------------------------------- (without these line)
class CfgSounds

{
sounds[] = {};
class storm
{
name = "storm";
sound[] = {"sounds\storm.ogg", +5, 1, 10};
titles[] = {};
};
};

---------------------------- (without these line)

Change storm to your file name
+5 is volume
10 is distance when hearable

Place this in the init field from radio: this say3D "name";
change name to your sound file!

Last edited by Fenris 89; Aug 8, 2017 @ 1:21pm
Fenris 89 Aug 8, 2017 @ 1:14pm 
Your sound file must be in OGG, you must convert it from mp3/ or what ever !

You can use "Any Video Converter"

http://www.any-video-converter.com/products/for_video_free/

Place the sound in your Mission folder, in sounds folder!
TheSurvivorGuy Aug 8, 2017 @ 1:31pm 
Wow that was fast. Thanks mate!
TheSurvivorGuy Aug 8, 2017 @ 8:48pm 
Slight problem, the audio starts skipping/lagging when you get close to the edge of the hearable range. Is that normal of did I ♥♥♥♥ something up.
Fenris 89 Aug 8, 2017 @ 9:54pm 
Thats not normal, maybe is something wrong with youre ogg file! If you use "Any Video Converter", use the "OGG vorbis audio (ogg)" and dont touch the options "Quality - Normal"!
TheSurvivorGuy Aug 9, 2017 @ 8:17am 
Honestly I just useda converter I found on the web for free. Guess I'll have to download that. Thanks again!
Johnny Rico Aug 20, 2017 @ 5:01pm 
Originally posted by The End:
Yes, you mean 3D Sound!
Save the script as description.ext in your Mission folder!

------------------------------- (without these line)
class CfgSounds

{
sounds[] = {};
class storm
{
name = "storm";
sound[] = {"sounds\storm.ogg", +5, 1, 10};
titles[] = {};
};
};

---------------------------- (without these line)

Change storm to your file name
+5 is volume
10 is distance when hearable

Place this in the init field from radio: this say3D "name";
change name to your sound file!

Hey man I just saw this after my last post! I know of 3d sound, but is there a way I can adjust the barrier of where I don't want the sound to play? Or adjust the distance it can be heard? Check out my other post if you want to know more about what it is I'm trying to do, but I will definitely lately try this when I get home!
Fenris 89 Aug 21, 2017 @ 4:01am 
@ Brand

Change in this line "sound[] = {"sounds\storm.ogg", +5, 1, 10}" the 10 in the scrpt, in the number you want to hear the sound!

10 = 10 meters hearable

You cant adjust the barrier, if you use the sound from an object! You can use an trigger, make the trigger 10 x 10, if the distance is 10 meter, and than place the trigger so that the sound is´nt hearable in the area, where you did´nt want hear the sound!

Tigger:

Activation by: Blufor
present

Activation: this say3D "name";

Edit: I see you post! You want hear the sound when you come in an room, than must the sound distance smaler, 1 meter, or use an smaller trigger place them behind the door! When the trigger filled the room, 4 x4 meter (trigger/ room size) for example! Than should the sound distance 2 meter in the script!



Last edited by Fenris 89; Aug 21, 2017 @ 4:14am
Dentist [2 RANG] Mar 15, 2018 @ 3:52pm 
does it work in MP
Marcus Suridius Sep 19, 2019 @ 7:13pm 
Anyone know what INIT to use to have music playing from an item, ive the OGG file but no idea what to add on the item ingame to make it work.
Fenris 89 Sep 20, 2019 @ 3:54am 
Originally posted by Marcus Suridius:
Anyone know what INIT to use to have music playing from an item, ive the OGG file but no idea what to add on the item ingame to make it work.

Did you have follow these steps from above?

Originally posted by Reg.42Fenris:
Yes, you mean 3D Sound!
Save the script as description.ext in your Mission folder!

------------------------------- (without these line)
class CfgSounds

{
sounds[] = {};
class storm
{
name = "storm";
sound[] = {"sounds\storm.ogg", +5, 1, 10};
titles[] = {};
};
};

---------------------------- (without these line)

Change storm to your file name
+5 is volume
10 is distance when hearable

Place this in the init field from radio: this say3D "name";
change name to your sound file!

You have to put the OGG file in

Documents\Arma 3\missions\your_mission\sounds
Kongou Nov 4, 2019 @ 12:45am 
Originally posted by Reg. 42 Fenris:
Yes, you mean 3D Sound!
Save the script as description.ext in your Mission folder!

------------------------------- (without these line)
class CfgSounds

{
sounds[] = {};
class storm
{
name = "storm";
sound[] = {"sounds\storm.ogg", +5, 1, 10};
titles[] = {};
};
};

---------------------------- (without these line)

Change storm to your file name
+5 is volume
10 is distance when hearable

Place this in the init field from radio: this say3D "name";
change name to your sound file!

After getting this working and set up let say i want to play another audio file on another object how would you do that?
Lonfox Feb 28, 2021 @ 9:50am 
Originally posted by Fenris:
------------------------------- (without these line)
class CfgSounds

{
sounds[] = {};
class storm
{
name = "storm";
sound[] = {"sounds\storm.ogg", +5, 1, 10};
titles[] = {};
};
};

---------------------------- (without these line)

Change storm to your file name
+5 is volume
10 is distance when hearable
so using this string how can i add multiple songs as a string?
Fenris 89 Feb 28, 2021 @ 10:00am 
Yes, like this script:

class CfgSounds

{
sounds[] = {};
class crank
{
name = "crank";
sound[] = {"sounds\crank.ogg", +5, 1, 10};
titles[] = {};
};

class grid
{
name = "grid";
sound[] = {"sounds\grid.ogg", +5, 1, 10};
titles[] = {};
};

class mgscodec
{
name = "mgscodec";
sound[] = {"sounds\mgscodec.ogg", +5, 1, 10};
titles[] = {};
};

class mgsalert
{
name = "mgsalert";
sound[] = {"sounds\mgsalert.ogg", +5, 1, 10};
titles[] = {};
};
};
< >
Showing 1-15 of 26 comments
Per page: 1530 50