16
Programming Questions / Re: Executing a Code after the Music Stops
« on: November 20, 2015, 02:46:33 PM »
Thank you for the Reply
I know how to stop sounds and how to destory instances but what I want is GM to execute a code (or just do something) after a song finishied playing.
I load the songs externally so I use this code:
of corse alot more songs will be added.
What I want is GM to execute this same code (with slight alterations but that is not the point) again after one song finished playing.
I know I could do this with alarms but that would be a bit exhausting since all the songs are a different lengh (frame count) I just want GM to know when a song is done and make it choose the next one.
I know how to stop sounds and how to destory instances but what I want is GM to execute a code (or just do something) after a song finishied playing.
I load the songs externally so I use this code:
Code: [Select]
dice = round(random(6))
[code]dice = round(random(6))
if dice = 0
{
audio_playmusic(paul_chuck);
}
if dice = 1
{
audio_playmusic(lucky_star);
}
if dice = 2
{
audio_playmusic(hey_arnold);
}
if dice = 3
{
audio_playmusic(katy_kat);
}
if dice = 4
{
audio_playmusic(super_mario);
}
if dice = 5
{
audio_playmusic(guru_ant);
}
if dice = 6
{
audio_playmusic(andante);
}
of corse alot more songs will be added.
What I want is GM to execute this same code (with slight alterations but that is not the point) again after one song finished playing.
I know I could do this with alarms but that would be a bit exhausting since all the songs are a different lengh (frame count) I just want GM to know when a song is done and make it choose the next one.