General Half-Life 2/Sound
description
The ambient_generic tool still has it's place in maps, so learn it's use here.
keywords
ambient, ambience, sound, sounds, ambient_generic.
Alright, so you want a little ambient sound in your map, maybe the sound of rain or the wind blowing, but how?
To start off you need to create the “ambient_generic” entity. To create the entity either click on “entity tool” tab located on the left or hit shift + e.
Using the pop down menu titled “Objects” located on the right, scroll down until you find the entity called “ambient_generic” Once you have found it left click on it.
Now place the entity some where in your map, it doesn’t matter were for the time being but I will explain about placement later.
Now click on the “selection tool” tab located on the left or hit shift + s, once you have done this select your “ambient_generic” entity.
Once you have selected the entity right click, scroll down to properties and left click on it. The Object properties window should have popped up.
Okay now in the “Keyvalues” box left click on “Soundname” and then left click on the “Browse” button. The “Sound resource browser” window should pop up.
Now as we are creating ambient sounds you will want to select the “RAW” option from the “Sound type” pop down menu. Once you select the RAW option a list of sounds should appear in the white box above.
Now to choose you ambient sound, to make it easier type in “ambient” in the filter submenu near the bottom of the “Sound Resource Browser” window. This basically means that only sounds with the word “ambient” in them will show up.
Unfortunately you cannot preview any of the sounds because they are all locked up in the steam files. So its trial and error to find the rite sound for your map.
Okay so for this example I am going to create a rain sound, using the scroll bar on the right scroll down until you find group of rain sounds. The list is alphabetically ordered so locating the sounds you want is easy. Anyway choose a rain sound and hit “Ok.”
Okay we are almost there just a few more things to do and then you can compile and try it out.
Click on the “Flags” tab located at the top of the “Object properties” box you should now be presented with three tick boxes.
Okay so we obviously don’t want our sound to start silent because we are not triggering it so you can un-tick that.
If you want your sound to play only once keep the “Is not looped” box ticked but if you want the sound to play forever then un-tick the box.
If you want your sound to play all over the map tick “play everywhere” if this is un-ticked you can define distance the sound should be heard using the “Max Audible Distance” Key vale located on the class info tab.
Okay all that’s left to do is set the volume of the sound. To do this click on the “Volume” Key value, then either set it to 10 or 0, 10 being the loudest and 0 being silent. Once you have done that your ready to compile and give it a go.
Now you have to remember not all sounds will loop, it all depends on the way the wav was constructed and as the preview sounds option doesn’t work at the moment its hit and miss whether you get a looping sound or not, so don’t think it’s broken because it only plays once you just need to pick another sound.
Also when placing the “ambient_generic” entity if you intend to have it play anywhere placement doesn’t matter as long as its in your map somewhere, but if you want to have it targeted near certain object for example a spark near a wire. Move the entity near the wire and then define how far away the sound can be heard using the “Max Audible Distance” keyvalue located on the “Class info” tab.
That’s it for now; hope you found this tutorial useful. Have fun making sounds in your maps.
Related:
Example Map
Signy









