The Dink Network

Midi question

July 10th 2003, 10:43 AM
peasantmb.gif
How to repeat a midi?
Let's say, when you battle for a long time some boss, and the midi isn't as long as the battle.
July 10th 2003, 10:50 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Attach this script to a sprite on the screen:

void main(void)
{
loop:
playmidi("boss.mid");
wait(500);
goto loop;
}

You would think that this would just start the midi over every half-second, but if the game receives a playmidi command for a midi it is already playing, it ignores it. So within a half-second after the midi stops, it will start again.

Credits go to Beuc (I think) for figuring this out.
July 10th 2003, 10:59 AM
peasantmb.gif
Thanks
July 10th 2003, 12:13 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Cool! I didn't know that.