sound_delete(index);
Argument | Description |
---|---|
index | The index of the sound to delete. |
Returns: N/A
WARNING!: This function has been deprecated and will no longer work!
This function will delete the indexed sound from your game.
NOTE: This is a permanent removal that lasts as long as the game is running, meaning that if the deleted sound is an included game asset, even restarting the game with
game_restart will not restore the sound. For that the game must be exited and re-loaded again.
if sound_exists(global.Music)
{
sound_delete(global.Music);
}
The above code checks to see if the global variable "Music" indexes a sound and if it does it then deletes that sound from the game.