Music End

Started by Hoffenlarft, Fri 27/01/2006 04:08:06

Previous topic - Next topic

Hoffenlarft

Hello, I was trying to attemp a little thing for my game. What I want is that when the music that it's currently runing in a room stops, the game quit. Any answers?

Gilbert

Put in repeatedly_execute() of the room:
if(IsMusicPlaying()==0) QuitGame(0);

However, if the player had set up the game to play without sound, the game would be quitted immediately upon entering the room (unless you want to force people to play your game with music, which is what I think you're going to). Alternate way is to time your music yourself, remember how long it will play, start a timer when the player enters the room. and then check if it expires in rep_ex() and quit if expired.


SMF spam blocked by CleanTalk