sound_stop

Stops the specified sound if it’s playing.

Use either

asset_get( sound )  Reference→
sound_get( sound )  Reference→

to retrieve the ID.

ArgumentTypeDescription
soundID:realThe ID of the game sound to stop

Example, called from attack_update.gml:

// this attack plays a charging sound that stops when you release the charge:
if (window == 3 && window_timer == 1) {
sound_stop(sound_get( "charging_sound" ));
sound_play(sound_get( "release_sound" ));
}