Arma 3
Not enough ratings
How to Add Ambient Music In Your Custom Missions
By Genesi[s]
This guide will teach you how to add custom/vanilla music that will randomly loop as you play, kinda like in the DayZ mod.
   
Award
Favorite
Favorited
Unfavorite
What You Need
You will need to have a couple of things ready before we begin:

1) Two or more .MP3 music files.
2) Notepad or Notepad++
Making The Music Game-Ready
First, go to the following website:

http://audio.online-convert.com/convert-to-ogg

And upload your .MP3 files, when they are done you can download them as .OGG files, which can then be used in Arma 3.
The Script
First, open up Notepad or Notepad ++ and type this:

["music1","playmusic",true,false] call BIS_fnc_MP;

// give enough sleep time until present music play over and wait for next music
sleep 400;

["music2","playmusic",true,false] call BIS_fnc_MP;

// Add more music files here
sleep 400;

null=[]execVM "playmusic.sqf";


Then save it as "All Files" and as "playmusic.sqf" and save it in your mission folder.

Now open up your mission folder under your documents, and create a new foldier in there called "music", then drag the two or more .OGG files into that folder, rename them "music1" and "music2" etc...

Now open a new Notepad file, and type this:


class CfgMusic
{
tracks[]={};

class music1
{
name = "music1";
sound[] = {"\music\music1.ogg", db+0, 1.0};
};
class music2
{
name = "music2";
sound[] = {"\music\music2.ogg", db+0, 1.0};
};
};

And add any more music files in there using the same format.

Now save this as "Description.ext" in the mission folder

Finally, open a new Notepad file, and enter this:

[] execVM "playmusic.sqf";

Save it as "init.sqf"
Done!
Now your custom music should randomly loop every few minutes, just like the DayZ mod!

Any questions? Leave 'em down below.
22 Comments
Genesi[s]  [author] Aug 22, 2021 @ 1:49pm 
Yes
Spyke Aug 21, 2021 @ 8:41pm 
Thank you! So thats one question, another is, if I am making a mission that I am having intentions of playing it with players, would they be able to hear it as well?
Genesi[s]  [author] Aug 21, 2021 @ 3:51pm 
Yes! Just put this:
[] execVM "playmusic.sqf";
Inside the trigger and not in init.sqf
Spyke Aug 21, 2021 @ 11:39am 
Is there a way they can be activated via trigger?
chrispools Aug 27, 2019 @ 4:51am 
great stuff. How do you turn the volume up, my files are a bit on the quiet side
ArteyFlow Oct 11, 2018 @ 8:44am 
Alright sick, I sent you an email
Genesi[s]  [author] Oct 11, 2018 @ 8:05am 
Sure, go to my profile you’ll find my business email there. Send me ur description.ext
ArteyFlow Oct 10, 2018 @ 6:50pm 
Actually, for some reason some of the songs keep repeating before the next one plays. Would you be able to look at my description.ext and tell me if I did something wrong?
ArteyFlow Oct 10, 2018 @ 4:23pm 
It works now, thank you so much :luv:
Genesi[s]  [author] Oct 10, 2018 @ 2:53pm 
Np!