Snarkpit Articles


If you are trying to use custom sounds in Hammer for your HL2 or CS:S maps, you may have run into the same problems that I did: It won't let you browse for your files, It will only let you browse some folder that you can't find.

When you are browsing for files in-game, there are files that the game will see that Windows won't. This is because it is actaully browsing inside of a GCF file that is used by HL2 or CS:S. The game counts the GCF files as subdirectories. Inside the main GCF files there are subdirectories such as "sound", "models," and "maps."

You can use your own custom sounds by doing the following:

1. Find where your .GCF files are stored, then create a folder called "sounds" in the folder. now you will have "[root]sound" As explained above, to the game there is already a "sound" folder, when you add this folder to your actual file system, the game will see them both. You cannot edit your GCF files as far as I know because Valve Anti-Ceating system will detect it and disable all your stuff. Keep in mind that anything in your physical folder will override anything with the same name, in the corresponding location inside the GCF file.

2. Now create a new subfolder inside the "sound" folder. You can name it anything you want, for example "airplane". Now you have "[root]soundairplane"

3. Then place your sounds inside of this folder. If your sound file were to be named explode.wav, then you would have a path of "[root]soundairplaneexplode.wav"

4.Now, in your map in the env_sound entity in the properties it would look like this:
sound: "[root]soundairplaneexplode.wav"
Substitute the name of your file and subfolders for the one listed here. Your sound should now play upon compilation.

Upon further experimentation, I realized that your sound quality cannot exceed 44Khz (cd quality). Also, there is no really good way to distribute sounds with your maps, as this is a more mod-specific feature. You don't have to create the extra "sound" folder, nor must you create any subfolder, the sound can be placed directly in the [root] folder for whichever game you are mapping for (HL2DM or HL2 or CS:S)

Please note that you cannot BROWSE for your custom sounds, you must manually input the path, as the browser will only look inside fo your GCF files.

This tutorial is now obsolete with the advent of the new programs that allow you to embed your sounds into your BSP files.


Post ReplyView Topic
Discussion
0 starsPosted by G.Ballblue on Sun Jan 16th 2005 at 9:59pm

0 starsPosted by Tracer Bullet on Wed Dec 22nd 2004 at 3:35am

The validity of the points you raised are not being questioned. I simply don't feel that a 2 is an accurate evaluation. I'd say a five or a six is about as low as you could rate it objectively. The key piece of information, which is clearly conveyed by this tutorial, is not what name you need to use for the custom sound(s) folder. It is the fact that the GCF files are where hammer finds the recourses, and the additional fact that you can create folders as adjuncts to the standard archives. Any "f**ktard" with GCFScape and a reasonable amount of grey matter could figure out the rest, so why be picky about it?
Post ReplyView Topic