Sound play

Plays the specified sound effect, supports both built-in and custom sounds. Returns the instance id of the sound played.

Syntax
sound_play( sound ); sound_play( sound, looping, panning, volume, pitch );

Returns
real (sound instance)

Basic
// attack_update.gml // Play a custom sound at the start of NSPECIAL's window 4 if (attack == AT_NSPECIAL) { if (window == 4 && window_timer == 1) { sound_play( sound_get( "custom" ) ); } }

Advanced
// Advanced code example if necessary. // If another code block is needed, take a look at this one in the Source Editor.