1. How do I set up music playing in game?
2. How do I use custom Music?
Music
Soundscapes are a lot of work but if gotten right they give the best results, though I'm sure they are a pain in the arse with mp3 format. W/e I dont really use, I used once a long time ago in my Empires map and ever since OC I've never bothered again.
However Ambient Generics are a pain in the arse too, though if you know the bugs connected with it then you'll be ok.
First things first, if your wav/mp3 file is not looped in the sound file then there is no way of looping it in hammer despite the entities options. No big problem, you need a free music program called GoldWave and just add a cue point at the start of the track and one at the end. And there you have it, though you can add your start cue half way through the track and it'll start from the beginning then after it finishes it'll restart from whereever your start cue is.
Now skip all that if your not after a looping sound but you want to play one track after another?
You would need to fire the output Playsound and then when your track finishes Stopsound, the latter is important. How do I know how long my track is? Wave your mouse over the file in windows explorer and it should tell you. And remeber hammer works in seconds, so 5 minutes = 300 seconds.
The important part is getting your sound to stop before the next one starts (this is only for music tracks) for ambience you can overlap and set radius etc.
Logic_timers can assist you in your quest for looping a whole set of music tracks.
However Ambient Generics are a pain in the arse too, though if you know the bugs connected with it then you'll be ok.
First things first, if your wav/mp3 file is not looped in the sound file then there is no way of looping it in hammer despite the entities options. No big problem, you need a free music program called GoldWave and just add a cue point at the start of the track and one at the end. And there you have it, though you can add your start cue half way through the track and it'll start from the beginning then after it finishes it'll restart from whereever your start cue is.
Now skip all that if your not after a looping sound but you want to play one track after another?
You would need to fire the output Playsound and then when your track finishes Stopsound, the latter is important. How do I know how long my track is? Wave your mouse over the file in windows explorer and it should tell you. And remeber hammer works in seconds, so 5 minutes = 300 seconds.
The important part is getting your sound to stop before the next one starts (this is only for music tracks) for ambience you can overlap and set radius etc.
Logic_timers can assist you in your quest for looping a whole set of music tracks.
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.
fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
'She has zero tolerance for idiots'.
fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
I wouldn't use soundscapes for music tbh, its a lot of work, you have to create trigger volumes and you have to think that little harder for multiplayer as you can end up with players running about your map re-triggering soundscapes etc. You just have to really think it out.
oc_waking_dead is an example you get music overlapping. Dont get me wrong I'm sure its possible to get right, most cs:s maps run on sound scapes for ambience etc.
oc_waking_dead is an example you get music overlapping. Dont get me wrong I'm sure its possible to get right, most cs:s maps run on sound scapes for ambience etc.
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.
fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
'She has zero tolerance for idiots'.
fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
For music played like in waking dead (that is you hear it everywhere like the battle music in HL²) you can just use an ambient_generic with the flag "Play everywhere" checked.
If you want to make a radio or something play a song, then you just uncheck that flag and choose the radio entity's name as "SourceEntityName".
If you want to make a radio or something play a song, then you just uncheck that flag and choose the radio entity's name as "SourceEntityName".