Pause Screen Interferes with Music!

Andre87Andre87 Member Posts: 42
edited November -1 in Working with GS (Mac)
I am using the pause behavior in order to pop up my pause scene. However, when the pause screen pops up, it apparently stops the music that's playing. And when I press resume to continue the game, the current music begins playing from the BEGINNING, not from where is left off when the pause scene popped up! Does anyone know a way around this?

I also tried using the Gameplay scene as the pause screen, and spawn the pause screen buttons there. But then, the buttons do not function since the scene where they are spawned (namely the Gameplay scene) is paused :(.

Comments

  • Andre87Andre87 Member Posts: 42
    P.S. using manual pausing, that is using a Game Paused boolean variable and creating a rule for all the actors so that the actors would do their thing only if the Game Paused attribute is false, solves the above problems. HOWEVER, it bring up another problem: some of my actors dont seem to give a damn about this attributes value. They continue to function wether it's true or false. My particle spawner is one of these objects. Anyone know a way around this one?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Sounds almost As if you have a pause music or stop music behavior somewhere inn your pause scene.
  • PhoticsPhotics Member Posts: 4,172
    Andre87 said:
    I am using the pause behavior in order to pop up my pause scene. However, when the pause screen pops up, it apparently stops the music that's playing. And when I press resume to continue the game, the current music begins playing from the BEGINNING, not from where is left off when the pause scene popped up! Does anyone know a way around this?

    Heh, I'm glad I read this thread. I just found a mistake with my game. But basically, I'm not experiencing the same problem. In BOT, I created an equipment menu. There's no music in that scene. When I return to the other scene, the music is still going. All I did was lower the music volume and then raise it again.

    I'm going to add a pause music behavior. The music can be stopped. Otherwise, the music just keep playing in the paused scene. That's how it works. Pause doesn't stop the music.

    It's like Rhianna... "Please don't stop the music."

    I think jonmulcahy could be right. It seems like there's an extra pause music behavior in there.
  • Andre87Andre87 Member Posts: 42
    I had a Game Music Manager object both in my Gameplay scene and my Pause scene. And, the only rule inside the music manager is this:

    IF Game Music State is true then "Play Music" behavior. Otherwise, "Stop Music" behavior.
    This is the only rule I have in the manager, and this is the only object that has the Play and Stop Music behaviors.

    And that is why Going to the pause scene from gameplay scene stopped the music, then started is again from the beginning.

    Now that I took out the music manager from the pause scene, going to and from the pause scene does not interfere with music. Except, turning music on and off from the pause screen does not immediately play or stop the music. I have to exit the pause scene in order for the music state changes to take effect. BUT, it's much better this way as far as I am concerned.
  • PhoticsPhotics Member Posts: 4,172
    Stop music is different than pause music.

    If the music is stopped, it cannot be resumed with the play music behavior.
  • Andre87Andre87 Member Posts: 42
    I know I know. But, I got it!! The changes now take effect immediately. All I had to to was us two variables for stopping and starting music, not one. One for State of Music play (music already playing, or music already not playing) and one for the "Request" for music (wanna start playing music, dont wanna start playing music). Now when I press the music off button in the pause scene the music stops IMMEDIATELY, instead of stopping after I exit the pause scene, like before.

    Thanks guys. Sometimes I need a little nudging to get things fixed :D. Your comments made me look at and think again about the music manager objects rules. Sometime looking again is all it takes to do it right :).
  • DizkoDizko Member Posts: 498
    I'm having a similar issue as well, I've tried to pause the music when pausing the game, however I cannot get the music to un-pause the game.

    I tried adding the on/off and doing a volume control... wait a minute.

    So, I'm having a eureka moment here. So, initially I modified my pause button to include on/off behavior for the music and it wasn't working right, it would work fine with out the pause game behavior, but wouldn't work with it. It just occurred to me that you don't even need to do that. Because the pause menu is in a separate scene, you could just include a "pause music when press" behavior on your pause button in your main scene, and then a "resume music behavior" on the pause button in your pause scene.
Sign In or Register to comment.