Ambient music functions

Abs

First time out of the vault
Firstly I have worked out how to get sound zones and general ambient sounds working, that's all good.

BUT I noticed there's a potential for an;

ambientMusic = {}

Line in a sounds.txt file. I just can't seem to get it working. To be clear my intent is to have certain maps play specific music tracks in the music category (as sound zones are considered "effects" in the volume control section of the options menu, instead of music).

I tried naming the file and putting it in the main music/mission folder, then referencing that file in the txt file. And I've tried putting the folder and file path in the brackets (like is done with ambient sounds) with no success. Am I using the wrong format? Or the wrong file type (I use mp3)?

Any advice?
 
I only managed to make it work with the core tracks, for example:
ambientMusic = {MX_ENV_CAL}

This plays the track MX_ENV_CAL1 in music\mission (or maybe a randomly picked track MX_ENV_CAL1 or MX_ENV_CAL2). Volume doesn't seem to be affected by any of the settings sliders though. So I played my custom tracks using the ambient sounds:

ambientSoundTable = { backtrack }

backtrack_numOfFiles = {1}
backtrack_file_0 = {sound/track.mp3}
backtrack_looping = {true}
backtrack_volume = {50}
 
I only managed to make it work with the core tracks, for example:
ambientMusic = {MX_ENV_CAL}

This plays the track MX_ENV_CAL1 in music\mission (or maybe a randomly picked track MX_ENV_CAL1 or MX_ENV_CAL2). Volume doesn't seem to be affected by any of the settings sliders though. So I played my custom tracks using the ambient sounds:

ambientSoundTable = { backtrack }

backtrack_numOfFiles = {1}
backtrack_file_0 = {sound/track.mp3}
backtrack_looping = {true}
backtrack_volume = {50}
Thanks for the comment, yeah I've been doing similar things. For the general background music I just dumped a bunch of music files (and some silent tracks to break it up a bit) into the custom music folder, but for things like locations specific music (for example a record player/gramaphone playing certain tracks in a building or whatnot), and then big generic lists of effects like wind in separate lists.

This seems to work best from testing, so I think once I've finished up more maps I'll use this formula as the baseline.
 
Back
Top