Hello everyone, I have been playing around with music today for my game... I wrote up a bit of code that was supposed to cycle through a selection of music based on the Location of the player in my game...
When I used dbPlayMusic() it played every song once but when it came back to the first song it played it just stops and doesn't keep cycling...
If you want to see the code I used:
if ( playingMusic == true)
{
if (dbMusicPlaying ( nowPlaying ) == 0)
{
playingMusic = false;
}
}
if(myLocation == "Developer Island" && playingMusic == false)
{
if ( (nowPlaying + 1) == 7 ) // there are only 6 mp3 files
{ nowPlaying = 0; }
else {
nextSong = nowPlaying +1;
dbPlayMusic(Music[nextSong].songid);
dbSetMusicVolume(Music[nextSong].songid,Music[nextSong].volume);
nowPlaying += 1;
playingMusic = true;
} }
So I'm wondering is there something with dbPlayMusic that only allows it to play once ? Or is there a specific way to do it that I'm not aware of ? x.x
Thank you in advance