Plays the indicated sound once.



Argument Description
index The index of the sound to play.

Returns: N/A


This function plays the specified sound once. If the sound to played is in *.mp3 format (ie: background music), then any other sound that is playing with the same format will be stopped as the legacy GameMaker: Studio sound system does not permit more than one *.mp3 format file to be played at a time.


if mouse_check_button_pressed(mb_left)

The above code checks to see if the left mouse button has been pressed and if it has, it will play the sound indexed in the variable "snd_MB_Press" once.

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