toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Music Resetting with new scene
Zenith_Gameworks
Member
Posts:
310
February 2013
in
Working with GS (Mac)
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
Socks
London, UK.
Member
Posts:
12,822
February 2013
edited February 2013
..
PixelMetal
Member
Posts:
283
February 2013
Hint: Rules and Attributes are your friend.
Zenith_Gameworks
Member
Posts:
310
February 2013
I tried using those but it still restarts
. It would be a great help if you could give me an example
Zenith_Gameworks
Member
Posts:
310
February 2013
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?
PixelMetal
Member
Posts:
283
February 2013
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.
JarrenH
Member
Posts:
206
February 2013
Create a new boolean game attribute.
If attribute is false, then play music and set attribute to true.
Zenith_Gameworks
Member
Posts:
310
February 2013
PixelMetal ok, but how would I make a rule saying "after music starts playing"
JarrenH
Member
Posts:
206
February 2013
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_Gameworks
Member
Posts:
310
February 2013
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.
JarrenH
Member
Posts:
206
February 2013
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_Gameworks
Member
Posts:
310
February 2013
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
JarrenH
Member
Posts:
206
February 2013
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_Gameworks
Member
Posts:
310
February 2013
Thanks, as long as I don't give people the idea that Im lazy lol
Zenith_Gameworks
Member
Posts:
310
February 2013
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.
Comments
If attribute is false, then play music and set attribute to true.
When attribute Game.Music = false
Play music
Change attribute Game.Music to true
https://dl.dropbox.com/u/23145611/Screen Shot 2013-02-19 at 5.17.37 PM.png
Replace "Numinous Shine" with your own music