Sound (decl)

What’s this?

Sounds shaders are primarily used to define a set of similar but different sounds (like footsteps or dripping water) for the purpose of breaking the monotony of using a single sound repeatedly. They also can dictate default settings for a speaker in which the sound is applied (like global, volume, etc.)

To use a sound in the game it is not required to create a sound shader however, without a shader the sound files must be referenced directly as they will not be listed in the sound browser or media inspector from within the level editor.

Syntax

sound [name]
{
[keywords]

[sound file]
[sound file]
...
}

Sound shader declarations begin with a header which consists of the text “sound” followed by the name of the sound shader.

The header is followed by the body of the declaration which is enclosed in curly brackets. The body contains one or more keywords followed by a series of sound file references.

You can include references to as many sound files as you like. However, keep in mind that the number of sounds that are actually loaded and used will be determined by the value of the CVar s_maxSoundsPerShader . This CVar’s value changes when selecting a different quality setting.