sound_stop

Stops a given sound.

Syntax:

sound_stop(index);


Argument Description
index The index of the sound to stop.


Returns: N/A


Description

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.


Example:

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".


Back: Legacy Sound
Next: sound_stop_all
© Copyright YoYo Games Ltd. 2018 All Rights Reserved