Soundscripts

From Valve Developer Community
Revision as of 15:45, 3 June 2005 by Erik Johnson (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Stereo Sound Directionality in Source

Adding ) in front of a stereo sound name in the soundscript such as ")weapons/m4a1/m4_shoot.wav" tells the sound engine that it is a spatialized sound. Use this on any stereo sound to give it directionality. If this is not used, when a sound originates to the right or left of you it will still sound like it is directly in front of you and you will not be able to tell where the sound is coming from (important on stereo gunshots). Stereo wav's that you want directionality with MUST have ) in them. Mono's do not need them, they will be spatialized already.

Distant Variant Sounds in Source

Adding ^ in front of a sound name, such as "^weapons/explode3.wav" tells the sound engine that it is a distance based sound. The left portion of the .wav is the 'near' sound that will play when the sound originates close to you, and the right portion of the .wav is the 'far' sound that will play when the sound originates far from you. If the ^ mark is not used in the soundscript the sound is treated as stereo with no directionality or distance. This is a different feature than the sndlvl entry to control attenuation. This distant variant feature allows you to play two different sounds (but using only one file) and crossfading between the two depending on how far away the sound originates.