Vlatitude: Sound Tutorial Last edited 4 months ago2019-04-25 11:34:15 UTC by Penguinboy Penguinboy

A level just isn't a level without some sort of sound in it, whether it be the sounds of computers in a computer room or a CD audio track. This tutorial is going to cover adding music to your level, adding ambience sounds, changing the sound environment, and triggering sounds.

Adding music to the level

The easiest way to add CD audio to your level is to go into Map and then Map Properties in WorldCraft. This will bring up an object properties box with many attributes. The attribute we're interested in is CD Track to Play. Track 1 (default) is blank so don't select that one unless you don't want any music. Now compile your level and check out your music. Notice that it plays continuously and this can be quite annoying. Well how do you get the music to play when the player nears a certain spot? Well read on and you'll get your answer.

Place a target_cdaudio entity in your level where you want the sound to be triggered from. For the Track # attribute select the track number you want to play. For the Player Radius attribute type in a radius. The CD track will play when the player gets within that radius of the target_cdaudio entity.

Adding ambient sounds

Adding ambient sounds is another thing that makes or breaks a level. A level without sound is just boring. Adding ambient sounds is easy to do. Just place an ambient_generic entity where you want the sound to be heard. the path/filename of WAV attribute is where you type in the sound you want. The ambience sounds are in the Ambience path. Let's place our ambient_generic entity near the ceiling and tell it to play an alarm sound. The sound we want is bigwarning.wav and it's an ambience sound so we type in Ambience/bigwarning.wav. I will post a list of the ambient sounds soon. Check back in a few days. Note: This is case sensitive so Bigwarning.wav would NOT work! Sounds can also be triggered just like lights can. To do so you give the ambient_generic entity a name and then give the switch or trigger a target of the same name you gave the ambient_generic entity. There are a few flags you want to change before finishing. Enable the start silent and is not looped flags or when you run the level the sound will start and continually play.

Changing the sound environment

Some of the sound environments are created by the game automatically, but there is room for additional manipulation. The sound environment is basically how a room sounds depending what it's made of. Like the footsteps in a room with a metal floor will sound different from a room with a concrete floor. The game does this for you. To change the sound environment you place an env_sound entity in the room you want to change. The radius attribute sets the radius of the effect. The Room Type attribute is pretty self explanatory. Note: When you have more than two env_sound entities, make sure they can't "see" one another (you can't draw an imaginary straight line from one to another without hitting a non-entity barrier).
This article was originally published on 69th Vlatitude.
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.