PlaySound (int sound_number)
Plays a sound effect. The game will search for SOUNDx.OGG, SOUNDx.MP3, SOUNDx.WAV
and SOUNDx.VOC (where x is SOUND_NUMBER) and play the first one it finds.
This command will find a free channel to play the sound on, if it can. Otherwise,
it will silence any previously playing sounds and override them with the new sound.
Pass -1 as SOUND_NUMBER to stop any currently playing sounds.
This command returns the channel number that the new sound is playing on, or -1
if it did not play for any reason.
Example:
PlaySound(3);
will play sound3.mp3
See Also: PlayMusic, PlaySoundEx
|