Pause Screen Interferes with Music!
Andre87
Member Posts: 42
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 .
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
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
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.
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.
If the music is stopped, it cannot be resumed with the play music behavior.
Thanks guys. Sometimes I need a little nudging to get things fixed . 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 .
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.