Cleanup is going to take awhile, so the site is back up but editing has been disabled.
MP3s and custom sounds on your map
From HalfLife 2 Knowledge Base
Inserting MP3s and custom sound files in your map
by Afotai
Hello and welcome to this tutorial to make MP3s and custom sounds play in your map.
First of all, as many of you know, is that HAMMER only browses in the GCF files, and we may not insert our sound file inside a GCF, this is pretty easy to do! We go to the root folder of our game, for HALF-LIFE² that is C:/Program Files/Steam/SteamApps/accountname/Half-Life 2/hl2
In that directory, there should be a folder called SOUND, if there is no such folder, create it. Now I created a subfolder called MP3 and this is the directory tree: Half-Life 2/hl2/sound/MP3 and thats the folder where i copy my MP3-file to.
If thats all done, we can start with the hammer part, first start off HAMMER. Im going to create a very simple map, only a small room with the sound.
STEP1 : Creating the trigger. I've setted up a basic room with a floor and skybox around it, or you can just use normal walls. Now i'd like to say that I use a special way of triggering something at the spawnpoint: i create "a wall"(see link at end of document) around the player. Browse for the texture TRIGGER and make a room that surrounds the player. After that we select the TRIGGER-walls, and we press CTRL+T (bind to entity) there we pick trigger_once.
The next step is creating the entity that will play the sound, this is the ambient_generic entity. We name the entity "music". At the SOUND NAME field, you can manually insert mp3/music.mp3 (our costum folder!) or you can browse for it. At the Flags tab we can check the different things: - Play everywhere (this make the sound play on the entire map) - Start silent (this makes the music not play on start of the map) - Is NOT looped (when this is checked, the song only plays ONCE, if you want it to be LOOPED you should UNCHECK this flag.)
After that we click Apply
STEP2 : Making the trigger triggering the ambient_generic.
First we select the box and press CTRL+T (bind to entity) As entity type, i picked trigger_once. I named the trigger_once "Trigger". We go to the outputs tab.
There you should press "Add..." this adds a new output that will be executed when someone will walk through the triggerbox. I inserted this :
My output named : OnTrigger Targets entities named : Music (the name of the ambient_generic Via this input : PlaySound
Also select Fire Once Only, or the sound will start again each time you cross the triggerbox and it will make you crazy. After that we click Apply. And we compile it. When you will test this in game and you walk away from your spawnpoint (into the triggerbox) the music will start.
Source and compiled BSP: http://users.pandora.be/afotai/mapping/MP3sourceAndBSP.rar
The Triggerbox :
2ND way (without my crappy triggerbox !)
Insert a logic_auto and use Output on MapSpawn, delay set it to whatever you want, then trigger the ambient_generic with PlaySound. Looping MP3s goes like this: for example your MP3 takes 3mins 20 seconds to play. We add a logic_timer in the map and we trigger the logic_timer after 200 mins, thats 3m20s, delay : 1s. Then we insert StopSound (this is the thing that makes us able to loop) and 0,1 sec after that, you trigger it again with Playsound, that easy!

