Midi question
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.
Let's say, when you battle for a long time some boss, and the midi isn't as long as the battle.
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.
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.