Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / What the...! Play Music is looping the song?!

Author
Message
KNau
22
Years of Service
User Offline
Joined: 25th Nov 2002
Location: Canada
Posted: 11th Mar 2004 01:50 Edited at: 11th Mar 2004 01:52
I'm trying to cycle between 2 theme songs during gameplay and for some reason the first song just loops continuously.

I know the problem isn't my code because I'm just using PLAY MUSIC and still when the song ends it just starts back up again. Even when I try to add code to check if MUSIC PLAYING(1) = 0 it doesn't detect the end of the song, it just keeps looping.

Here's a quick test I did (just subsitute your own .it or .midi file), this should work but doesn't:



Using PLAY MUSIC means the music will play once and then be over, correct?

Unless someone has an answer for this I'm going to have to create a song_length variable for each song in the game and cycle music that way. Is this a known issue in DB Classic?
Bishop
22
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 11th Mar 2004 01:54
you may need to use the stop STOP MUSIC command.....just a thought

Bishop

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
KNau
22
Years of Service
User Offline
Joined: 25th Nov 2002
Location: Canada
Posted: 11th Mar 2004 02:18 Edited at: 11th Mar 2004 02:33
Yeah, that's what I'm going to have to do. Although you don't have to STOP SOUND when you play a sound or STOP ANIMATION when you play a set of frames. It just threw me that this would be different.

It could also be something to do with the .it format. I don't seem to remember having this problem when I used midi. Anyways, I've fixed it using timer variables and the STOP command.

Login to post a reply

Server time is: 2025-05-23 08:34:11
Your offset time is: 2025-05-23 08:34:11