Checks to see if a given sound is playing.



Argument Description
index The index of the sound to check for.

Returns: Boolean


With this function you can check to see if an instance of the sound index is playing currently (true) or not (false). Please note that if you do this check a moment after the indexed sound is supposed to have started it may return false erroneously as the sound system has not had enough time to initialize the sound properly.


if !sound_isplaying(snd_Music)
   instance_create(x, y, obj_GameOver_Menu);

The above code checks the sound to see if it is still playing and if it is not, it plays another sound and creates a new instance.

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