sound_loop

Loops the indicated sound.

Syntax:

sound_loop(index);


Argument Description
index The index of the sound to loop.


Returns: N/A


Description

This function can be used to make a sound play and loop (ie: when the sound ends it immediately starts again) from the moment the function is called until either of the functions sound_stop or sound_stop_all are used. If the sound to loop is *.mp3 format, then it will silence any other *.mp3 sound currently playing.


Example:

if global.Music    {
   sound_loop(snd_MainMusic);
   }

The above code will check a global variable and if it returns true then the sound indexed in the variable "snd_MainMusic" will start to play and loop again when finished.


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