Song Problem, please Help, Maybe Bug?

MagoNicolasMagoNicolas Member, PRO Posts: 2,090
edited November -1 in Working with GS (Mac)
Hello guys, how are you?

Im Having a Problem, With Music behaiviours.

I have an Actor that Plays Music and Loop on my game Screen.

When YOu go to Game Over Screen the Music Stops.

If You Pause Game, when you Unpause, I Use the behavior Play Music: Resume Current Music.

On Creator works Great!

But On, device The Song only plays the firs time, Then When GameOver, and restart, the music doesn't play, It only plays again if you pause and unpause.

Any Clue?

Thanks!

Comments

  • GamersRejoiceGamersRejoice Member Posts: 817
    Argh! This is a bug. If you were to turn the music volume back up you will notice that it IS actually playing. The workaround I discovered was to place change attributes with music volume back to 1. The problem with this is if you close the app and re open it the music will start automatically back up. SO, this means you can't have a music controller in your game without it being buggy.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    GamersRejoice said:
    Argh! This is a bug. If you were to turn the music volume back up you will notice that it IS actually playing. The workaround I discovered was to place change attributes with music volume back to 1. The problem with this is if you close the app and re open it the music will start automatically back up. SO, this means you can't have a music controller in your game without it being buggy.

    mmm Im not using music controller, I Just Play Music, Stop Music, PlayMusic (REsume).

    You Say this would work If If Change th eVolumen back to 1? even though I never change the volume in the Game?

    Cheers.
  • GamersRejoiceGamersRejoice Member Posts: 817
    MagoNicolas said:
    mmm Im not using music controller, I Just Play Music, Stop Music, PlayMusic (REsume).

    You Say this would work If If Change th eVolumen back to 1? even though I never change the volume in the Game?

    Cheers.

    Yup, just place the change attributes wherever you have your music behaviors. :)
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    GamersRejoice said:
    Yup, just place the change attributes wherever you have your music behaviors. :)

    Will give it a try!

    Thanks!
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    This Didn't solve my problem :(
  • hman360hman360 Member Posts: 590
    This happened to another game I was working on, here is what finally worked:

    Make a boolean called play music. First make it so when attribute "play music" is true, start the music. When gameover is true, change attribute play music to false (or when touch is pressed on game over screen). When the main scene is back, change attribute play music to true.

    I have another method that is much more complicated so if this doesn't work let me know.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Thanks Dude, But Finally I Found a solution.

    One Actor With:
    Play Music
    Pause Music
    Play Music (Resume)

    One Pause Button that:
    Pause Music

    One Unpause Button that:
    Play Music (Resume)

    And In GameOver Music Stop.

    This work great, kind weird, but works perfect :D

    Cheers.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Mago just curious where you using the reset scene. Behavior?

    If so that behavior kills music for some reason even though if you where to use change scene back to the same scene it would work. That has always annoyed me.

    If no. Then well Im glad you got something working for you.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    When I "Die" I Change Scene To Game Over.

    Then When Hit: "Play Again" Change Scene to Game Scene, so NO reset scene on my game.

    :D Im glad it worked 2
  • hman360hman360 Member Posts: 590
    Great!
  • LumpAppsLumpApps Member Posts: 2,881
    I might have found another solution.
    Not sure if it is the same problem.
    When I pause and in the pause menu turn the music volume to 0 it is turned on after unpause.
    When I pause and in the pause menu turn the music volume to 1 it is turned off after unpause.
    The values are still 0 or 1 whatever I switched to but the music doesn't play.

    I made a change attribute next to the unpause rule that says change game.Audio.Music Volume to game.Audio.Music Volume.

    Stupid but it works in my case.

    Cheers,
    Ludwig
  • hman360hman360 Member Posts: 590
    So what exactly do I do? I have the same music running throughout the game. Should I put it in once and turn it up and down or should I add it to all of the scenes?
  • LumpAppsLumpApps Member Posts: 2,881
    I don't exactly understand your question.

    To play with the volume (under the 'e'): attributes: device: audio: music volume
    (0 = silence but the music plays on, like when you put the volume down on your walkman (80's iPod ;)
    To pause music: ad the attribute Pause music
    To unpause music: ad the attribute play music and choose resume current music

    Hope that helps!

    Cheers!
  • hman360hman360 Member Posts: 590
    I have the same music running throughout the game. Should I make it play in one scene, and in the next scenes change the volume to 1 again. Will the music carry over to all of the scenes if I add change volume to 1 in every scene?
Sign In or Register to comment.