|
Triggering a Sound
Ok , first thing to do is build your map.
Then we are going to pick our sounds we want to play in the map. Hit the
Entity Tool 
and select ambient_generic entity.
after selecting
ambient_generic entity ,just point
and left click in the
3d view where you want the entity to go.
(you can also left click it in 2d views and then,adjust it in the other
2d view windows, then hit
enter for it to appear).
Now in the ambient_generic entity,
browse thru the sound files
you can check off the autoplay box to listen
to sounds and use the filter parameter to
search for sound
names and select your sound.after you selected the sound you can do all
the adjustments in the properties
window , set volume and other things, make sure to set in flags tab ,
Start Silent and perhaps Is Not Looped.
Now let's make sure we name it, so
we can trigger it.
Ok now browse thru your materials and find the trigger
texture
(*filter word*
tools) ,now make a brush where you want the
player to walk thru and the sound will play.
Now highlight the trigger_brush and hit the
To Entity button,select trigger_multiple.
This brush will be
invisible in game and you will be able to walk/shoot thru it.
Now click on the Outputs Tab.
Here will will target the ambient_generics we made and named.
Click the add button, click the drop down boxes on right side and select
appropriate settings.
My Output Named , select OnStartTouch
or OnEndTouch
Target entites named , select the name
of your ambient_generic
Via this Input , select PlaySound
After a delay in seconds , (add in a delay
if you want) if triggering multiple sounds from one
trigger brush it is a good idea, so they dont overlap each other.
So in my example I am triggering 5 sounds with one brush.So I set up the
delays for the sounds.
First sound plays instantly, 2nd thru 5th sound , plays with the delays
shown in image.
you can click the fire once check box if you want that sound to happen
once.
This is what the trigger brushes look like in hammer.
Click this image for an example map.Or
just click Here
|
|