sound_stop(index);
Argument | Description |
---|---|
index | The index of the sound to stop. |
Returns: N/A
With this function you can stop all instances of the given sound. Note that if the sound is being played by different instances all will stop playing, regardless of the instance running this code or that is
playing the sound.
if lives = 0
{
sound_stop(snd_GameMusic);
}
The above code will check the number of lives that the player has and if it is equal to 0, it will stop the sound playing that is indexed in the variable "snd_GameMusic".