Music off for every scene?
Games4life
Member, PRO Posts: 279
Hi GS,
I can't seem to find a direct forum thread that states how to turn off the music in every scene. I have my music button so that when the player hits the music off button the music turns off. However when I go back to a random scene the music is there again. Do I just have to make it so that when the play hits music off the music is turned from false to true?
Thanks and enjoy the holidays,
~G4L
Comments
Bump
You've not supplied much for people to work with here, you don't say how the music is turned off, or turned on, whether it is turned on in each scene, and if it is with what rules or behaviours are used, or what conditions need to be met for the music to start or stop, maybe you are using resume music or you are turning the volume up and down . . . . etc etc . . . so the best you'll get are some random guesses, but mostly people tend not to bother getting involved in questions like this
Hi @Games4life as @Socks mentioned, a bit more info would be helpful to help nail the problem. What are you using to stop the music with - a Stop Music Behaviour presumably?
And do you have any Play Music behaviour outside of your music on button?
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
My sincere apologies. All I want to know is how to have he music be turned off in every single scene once the music off button is pressed. I have it so that once the music off button is pushed the play music is turned off. I am using the play music and the stop music functions hope this helps.
Absolutely no need to apologise, I was just pointing out that without any kind of details you end up with a guessing game, or people simply can't bothered to try and extract all the necessary details . . . no one has been harmed
Not really, it doesn't add much in the way of useful information.
I made a rule like this just now. Can you confirm that this is accurate? This seems to be working in my game as well.
Thanks for everything,
~G4L
When attribute game.music is false
Play Music
--> this rule is redundant because you already have a Play Music behavior below.
When touch is pressed
Change Attribute game.music to true
Stop Music
--> this will make game.music true and stop the music
When touch is pressed
Change Attribute game.music to false
Play Music
--> this will make game.music false and stop the music
It's hard to say much more without knowing which actors go with which of these rules.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hi @Games4life Try this:
Rewrite 2nd rule as follows:
When touch is pressed
Nested: When game.music is false
Change Attribute game.music to true
Otherwise
Change Attribute game.music to false
Delete 3rd rule.
In your first rule, i've changed the logic, presuming you don't want the music to be automatically playing, only playing when button touched, then not, then playing, etc, toggling on or off as you want.
So make this first rule:
When game.music is false
Stop Music
Otherwise
Play Music
Put these two amended rules into your button and you should be able to toggle the music on and off as you want.
This is off the top of my head but should work.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Hard to say really, are these all in the same actor, in the same scene, is there anything in the otherwise sections (I'll guess they are empty as you've left them closed in your screenshot) . . . . etc ?
I have the first rule in the 3 scenes have play music
the second rule is in the Music Off button
The final button is in the Music On button
I tested on iPhone and it worked as well. I can now listen to my own music.
Hope this helps!
~G4L