Adding music to maps?

Erick0000000001

L1: Registered
Sep 17, 2023
5
0
I want to know if there's a way to add music to a map, like in Open Fortress, TF2 Classic or MvM. I'm trying to add some custom music to a map I like. I don't have much experience in mapping, but I'm a fast learner.
 
T

The Asylum

There's two ways, ambient_generic or env_soundscape

If you want to go the ambient_generic route, note that you may have to use multiple instances of them, they are pretty quiet. Upside is, they're much more reliable to switch on and off
 

Muddy

Muddy
aa
Sep 5, 2014
2,582
4,598
ambient_generic is pretty easy to use. Just specify a sound, and remember to have "Play Everywhere" checked and "Start Silent" and "Not Looped" unchecked.

Put the audio file in tf/custom/(any folder name you like)/sound/* . Make sure it's a 44100hz .wav file (.mp3 files don't loop, even when "Not Looped" is unchecked, because Source).

It is worth noting though that packing music into your map will greatly increase the filesize.
 

Erick0000000001

L1: Registered
Sep 17, 2023
5
0
Update: I tested it and the music works fine now. The only problem is that it's not looping for some reason. The file I'm using is a .wav and I have 'does not loop' unchecked. The audio file is also 44100hz.