SoundLevel
Category: Effects
Since engine version: 4.6.5.0 CP
(extended in 4.9.6.0 CR)
Description
Plays a sound effect in a continuous loop until it is stopped manually. If pObj is not specified, the sound position is global so the sound will be equally audible everywhere in the landscape.
Syntax
void SoundLevel
(string szSound, int iVolume, object pObj);
Parameters
- szSound:
Name of the sound effect (without .wav ending)
- iVolume:
0-100: volume for playback of the sound. A volume value of 0 stops playback.
- pObj:
[opt]
If specified, the sound is played for this object. From 4.9.6.0 CR
Remark
As the function will fail if the sound is already playing you should manually stop the sound first.
Examples
SoundLevel("Wind", 0);
SoundLevel("Wind", 50);
Creates continuous wind background noise.
SoundLevel("Blast1", 100, GetCursor(0));
Annoying secret weapon: the selected clonk of the first player continuously playes an explosion sound.
Sven2, Juni 2003
Clonkonaut, April 2008