Game Maker Language リファレンス > 組み込み関数 用途別 > サウンド > audio_pause_music
BGMを一時停止します(非推奨)
audio_pause_music();
注意! この関数は非推奨です。代わりにaudio_pause_sound()を使用してください。
With this function you can pause a music track that is currently playing.
if keyboard_check_pressed(ord("P")) { global.Pause = !global.Pause; if global.Pause { audio_pause_music(); } else { audio_resume_music(); } }
The above code checks for a press of the keyboard key "P" and if it detects one it sets the global variable "Pause" to true or false and then either pauses the music or it resumes the music from its paused state depending on the returned value.