Dynamic Music

Tutorial collection, comprehensive listings on main site.

Dynamic Music

Postby Tutorial on Sun May 02, 2010 9:05 pm

category
General Half-Life 2/Sound

description
A simple guide on blending ambient sounds as the player moves around your map.

keywords
sound, dynamic, audio, music, trigger_multiple.

Have you ever thought

'I would like dynamic music, but I don't know how!'
Worry no more, I am here with an awesome guide!


Okay so to start make a room, I made this.

Image

I have put the four floor brushes so I know where my music will play when I step on them.
You can do what ever you want.

Okay, next make four trigger_multiple's (Or how ever many songs you want to have.) with the tools/trigger texture.

Image

Then you are going to want to place four ambient_generic's, name them each differently.

I'm going to name mine song 1,2,ect.

Image

Look for the song you want to play, set the fade time to whatever, I made mine 10.
Go over to the flags and check 'play everywhere' and 'Start Silent' and un-check 'Is NOT Looped

Okay, now that is done. Let's place a logic_case and name it 'case1'.

Image

Obviously as you see in the picture, put your ambient_generic's in order in the cases.
This is giving the cases a name, you don't have to put the ambient_generic's name in there.
You don't need to fill them all up.

Next go over to the Outputs tab.

Image

Basically 'OnCase1' that's the first case in your logic_case. It will 'Target' the first ambient_generic.
Then you will have it 'PlaySound'. Do the same thing for the other ambient_generic's
except change the 'PlaySound' to 'StopSound' that way they won't play over one another.

Now after you do all that for the rest of the cases go to your trigger_multiple's. And over to the Outputs.

Image

Do 'OnStartTouch' then your cases name, then 'InValue' and the name of your case in the logic case.
I named mine 'song1' so I put that in there.

That's about it, you can trigger cases without using trigger_multiple's like if an NPC has seen the player trigger action sound, or whatever.

Note: Due to popular demand I must say that this is faking dynamic music. But the player won't know the difference if you use it right.

-Armageddon
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Re: Dynamic Music

Postby source-maps on Sun May 02, 2010 9:10 pm

you could also apply the same technique to lots of other things other then sound :)
User avatar
source-maps
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Feb 09, 2007 7:50 pm
Location: The Netherlands

Return to Tutorials

Who is online

Users browsing this forum: No registered users