Prevent Music from stopping?

TouchTiltGamesTouchTiltGames Member Posts: 1,162
Trying to keep my background music from stopping when I go back to the Main Menu (which is where I'm telling it to play from). When I'm navigating throughout the menu screens, it will play and loop, but when I hit "back to menu", the music starts over. I've got a "change scene" on the button to get back to menu, should I be using something else?

Comments

  • JackBQuickJackBQuick Member Posts: 524
    How about a rule that says if game.Time = 0, play music? That would start the music once but it shouldn't start it again when you return to the Main Menu.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    lol maybe not the best but i make a duplicate of my start screen and menu screen

    One with continue current music and another with play song

    then i go to which ever is needed

    Pretty easy because option are global and you can command-C scenes

    Odd way around it but it works perfectly
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Haha thanks guys, I'll try both :D
  • gazjmgazjm Member Posts: 578
    The way I work it is, i create an attribute called music playing, then create a rule such as

    music playing = 0
    play music & change music playing to 1

    that way, it sets the music playing the first time it loads, but from then on won't restart the music as the attribute is now 1.
  • gazjmgazjm Member Posts: 578
    I forgot to say, when the player gets gameover etc and changes back to the menu screen, add a rule to change music playing to 0 in the change scene rule. That way it will start up again.
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Thanks, Gaz that did it for me :)
Sign In or Register to comment.