Jump to content


Photo

Music stops playing even though it shouldn't?


  • Please log in to reply
1 reply to this topic

#1 dynamitey11

dynamitey11

    GMC Member

  • New Member
  • 102 posts

Posted 30 August 2011 - 06:13 PM

Hi, I am working on a game that has it's own time system, and in the town in my game I have an object that is supposed to play the correct music at the correct time of day. I have a daytime song sound, and a nighttime song sound. Mostly everything seems to be working, but when the time reaches near or around 0:00 (near early in the morning) on the clock, all music just stops and never plays again even though it is supposed to. I am using the Super Sound System extension in my game, by the way. I am wondering if it could have something to do with that, or if it just merely a coding flaw that I cannot seem to figure out. If anyone knows what is wrong and could help, thank you very much! :) I copy and pasted the object information below. Also, if this is in the wrong section, I apologize.


Create Event:
execute code:


global.daytown = SS_LoadSound("town.wav", 0);
global.nighttown = SS_LoadSound("nighttown.wav", 0);


if global.hour >= 6 and global.hour <= 19
{
SS_LoopSound(global.daytown);
}

else

SS_LoopSound(global.nighttown);



Step Event:
execute code:

if global.hour = 20 && global.minu = 0 && global.sec= 0
{
SS_StopSound(global.daytown)
SS_LoopSound(global.nighttown);
}


execute code:

if global.hour = 6 && global.minu = 0 && global.sec= 0
{
SS_StopSound(global.nighttown)
SS_LoopSound(global.daytown);
}

  • 0

#2 G-Games

G-Games

    GMC Member

  • GMC Member
  • 501 posts
  • Version:GM8

Posted 30 August 2011 - 06:18 PM

There could be the problem that 0:00 equals to 24:00 in Game Maker. Just for a step, but still.

I don't know much about this extension, but the clock might simply be your problem.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users