Music Resetting with new scene

How could I make it so that once a music file plays, it doesn't reset if you go back to the screen that originally triggers it?

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2013
    ..
  • PixelMetalPixelMetal Member Posts: 283
    Hint: Rules and Attributes are your friend.
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    I tried using those but it still restarts :(. It would be a great help if you could give me an example
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    I made it so if you press a button on the main screen, the attribute game.music changes to 1 and save that attribute. Then I said if game.music = 1, play music. Any help?
  • PixelMetalPixelMetal Member Posts: 283
    Well, it's going to see that 1 every time the scene reloads, so you want to change it to a value other than 1 after it's started playing.
  • JarrenHJarrenH Member Posts: 206
    Create a new boolean game attribute.

    If attribute is false, then play music and set attribute to true.
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    PixelMetal ok, but how would I make a rule saying "after music starts playing"
  • JarrenHJarrenH Member Posts: 206
    You don't. You set a rule that checks the attribute.

    When attribute Game.Music = false
    Play music
    Change attribute Game.Music to true
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Can you just post the full set of rules you would use? I think it would be easier to start from scratch with the music.
  • JarrenHJarrenH Member Posts: 206
    Look at this:
    https://dl.dropbox.com/u/23145611/Screen Shot 2013-02-19 at 5.17.37 PM.png

    Replace "Numinous Shine" with your own music
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Thanks so much, didn't know it could be that simple. I swear one day I will look back at all these dumb questions im asking on the forums and laugh :)
  • JarrenHJarrenH Member Posts: 206
    edited February 2013
    Haha, I give you credit for asking! I've wasted hours because I've been stubborn and tried to figure something out on my own.
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Thanks, as long as I don't give people the idea that Im lazy lol ;)
  • Zenith_GameworksZenith_Gameworks Member Posts: 310
    Quick question: apple can't reject your app if you import music from another source right? Ill be sure to give appropriate credits
Sign In or Register to comment.