WiseCustomSound: Custom sounds

From Valve Developer Community
Jump to: navigation, search

This tutorial was originally created by wisemx.

Ported from SDKnuts.net to VDC by: Pinsplash (talk) 00:19, 21 July 2018 (UTC)

The sound file formats you can use in your maps are WAV and MP3. (only 16 bit format for wav!) Custom MP3 and WAV files are both used in this project.

Notes:

  1. You can not preview MP3’s in Hammer.
  2. Keep the overall file size in mind, WAV files can be enormous.
  3. Use clever names for your sound files. i.e. mapnameWaterFall.wav
  4. Try to use your own folder to prevent conflicts.
  5. Please respect copyright laws.

The first thing to do is create the folder for your custom sounds. For this tutorial I’ve used a folder named akilling. The path under HL2 for my sounds is: \Half-Life 2\hl2\sound\akilling\. Notice that it’s \sound\ and not \sounds\. Now place your custom sound files in this folder. It’s important to do this before you load Hammer so the sounds will show in the browser. Because my folder is called \sound\akilling\ I can use the word akilling to filter for my sounds. (Porter's note: In most games, you actually HAVE to put your sound files under another folder in \sound\ or they won't work.)

Make sure when you use the Sound Browser that Raw is your current Sound Type. (Porter's note: You can choose to give your sounds a Soundscript entry to give you extra sound features, but for this you don't need to.)

wisecustomsound01.png

Once you select the sound filename in your ambient_generic it should include your folder like this:

wisecustomsound02.png

Remember you can not preview MP3’s in Hammer but you can preview WAV files.

A few things to consider are:

  1. How will you play the sound.
  2. Will it be looped.
  3. Can/Should the sound be heard everywhere.

In this project I’m playing the sound files from a logic_auto. When the map loads the lights will come on and the Zombies will begin singing. When the song ends the lights go back out, clapping is heard and the Zombies leave.

wiseCustomSound03.jpg

The colored Zombies in the image above are not a trick. I simply changed the FX type and color. You can play sounds automatically or with a variety of input methods. The logic_auto I’ve used here could just as well have been a trigger or button. Once you have your custom sound files playing in your map you will want to embed them into your BSP before distributing it.

See Also