sound and music issue

kajutokajuto Member Posts: 314
edited February 2012 in Miscellaneous
hi everyone!!!
in my game i already put the sound and music for it, and in the option scene i can turn off the music background and fine, but after i play a level and then i come back to the main menu the music start again, how it can stay turn off until i turn it on ??? help please

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi @kajuto

    Providing you set the Music volume to 0 via game.Audio.Music Volume in your option scene then going back to your main menu, the volume should still be off. If it's on, you must have set the volume back to 1 somewhere on the main menu. Hope that helps! :-)


    ----------------------------------------------
    http://davidgriffinapps.co.uk/

    iPad: End of the Earth game coming soon to the iTunes App Store....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kajutokajuto Member Posts: 314
    not really, jajajjaaj but i want to know, oka...i have a music bckgrnd in the main menu and level, after i enter to play and let say i want to go back to main menu, i put a button when touch is pressed show pause scene and when i click it go back to the level menu and the current music continue to play where it left off. that it, fine, but when i turn off the music the it only turn off in the main menu (music stay off) and level menu( in that moment), but when i click the pause button and go back to level menu (the level menu button in the pause scene i put a behavior to resume the music) and the go back to main menu from the level menu it won't resume the music in the main menu, i want to turn it off the music even when i come back to main menu for any reason until i turn it on again
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    It sounds like you've got a lot of menus... ;-)

    It really is straightforward as I first suggested! As long as when you want to turn off the music you change the Music volume attribute to 0; and when (and wherever) you want to turn it back on again then change the music volume to 1. :-)

    A suggestion: rather than having lots of these, where they could get "tangled", just have both off and on on the same screen, perhaps your option menu. You can even make it so that just the one button is used:

    When touch is pressed

    When game.Audio.Music Volume =1
    Change attribute game.Audio.Music Volume to 0
    change image to offpic.png
    otherwise
    Change attribute game.Audio.Music Volume to 1
    change image to onpic.png

    Another option you might want to try is: instead of changing the music's volume, use Pause Music behaviour and Resume music; that way the music doesn't carry on playing like when the volume is set to 0 from 1.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kajutokajuto Member Posts: 314
    it doesn't work, i went to option scene and turn off the music. after that, i went to play the game and come back to the level menu it start to play again, and back to the main menu from the level menu, in the main menu isn't start to play music...

    =-(
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    It sounds to me that one of two things is happening: either you've got a behaviour switching music on or off, other than those in your option menu, or you haven't checked loop in the Play music behavior.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kajutokajuto Member Posts: 314
    i checked loop, but where it suppose i can find the behavior that u said i put the music on or off?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi again @kajuto

    I think you mean you can't find the attribute to turn the music on or off...

    OK, in the Change Attribute Behavior - connected to the change attribute field, you'll see 3 dots; click on that. Then click on Devices > Audio > Music Volume. Then in the "To" field, put 0 or 1.

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kajutokajuto Member Posts: 314
    ok...but before that, how i know which connected to the change att field??
  • kajutokajuto Member Posts: 314
    https://www.facebook.com/Kajuto, i printscreen the music on/off actor and the 4 behavior, can u go to my Facebook wall, i put the photo there, to make it easy for you...
    thanks...
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I've just sent you a friend request so when you accept, I'll take a look at your screen grab and hopefully we can sort it for you. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kajutokajuto Member Posts: 314
    Thank I hope that help u :-)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi, there are some issues with your Rules, I think, as well as a couple of things which I don't quite understand what you are trying to achieve:

    Firstly, in your first Rule, I'm not sure why you need a wait of .5 of a second before your Rule to start the music.

    Then I don't understand what the purpose of your boolean attribute is - game.Music Cont... because you're playing your music, 44-Rowdy Rumble (which presumably is over 30 seconds in length) for just 1 second.

    Then I don't understand why you have set the music volume to 0.3 without any conditions.

    Also it seems you've made a boolean switch (game.Score Music) to change the volume of the music between 0 and 1, which you don't need to do.

    If all the above is for simply for getting music to start playing, and when a button is pressed the volume goes to 0, and if pressed again, goes back to 1, etc., then I'd recommend you scrap your Rules shown in the picture and use the Rules I suggested in my 2nd post.

    Here it is again, with a small addition:

    Wherever you want to start the Music playing, put in the actor:
    Play Music Behavior Sound: 44-Rowdy Rumble --- set to loop if you like

    then what I wrote previously as a suggestion, in a button, perhaps in your option menu or on all levels:

    When touch is pressed
    When game.Audio.Music Volume =1
    Change attribute game.Audio.Music Volume to 0
    change image to offpic.png
    otherwise
    Change attribute game.Audio.Music Volume to 1
    change image to onpic.png

    The idea of the Change Image is that one would say something like Volume or Music Volume, one pic with the addition of the word "On", the other with the addition of the word "Off". So as you press to change states, so the picture shows the state of the music volume, but you don't have to use Change Image if you don't want to.

    I hope that's helped out.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kajutokajuto Member Posts: 314
    the first 0.5 second is for the music not to start right away the music, that what's i have studying most of the game of the market.
    Second about the music 44 Rowdy Rumble i know the length of it, but if some people like me, that like to hear the whole music the loop again.
    The 0.3 music volume i did it because a tutorial did that, so i just follow the rule.

    what i really want is this.

    have a music backgrouind in the main menu and when i enter the level menu, that music continue to it, but STOP when i start playing, (stop that song) , but start to play another song background for the gameplay and also when i slide the volume to make the music and sfx not so loud or just to turn it on or off...that the whole point for it..
    help me
  • kajutokajuto Member Posts: 314
    In the gameplay i put a pause button where it has a button level menu button ( when touch it press send me back to level menu and resume the music) it work fine when I don't turn off the music but when I do everytime start to resume the music when I come back to level menu. But if I don't put that button and don't turn off the music and I come back to level menu it don't resume the music where it left off
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi @kajuto .... OK, I'm getting exactly what you're after now! :-)

    That's fair enough about starting your music 0.5 seconds after; but most people don't do that, I'm certain. And even if they do want a pause before playing, it'll be a time more than 0.5 of a second (that's such a short time that no one will notice and so you might as well not bother with a start timer!)

    As to your music 44 Rowdy Rumble, that's fair enough what you wrote; although I still don't understand why you stop the music one second after it's started... I would ignore that piece of your Rules.

    I understand now why you set the music volume to .3 - you don't need this; I'll explain how to adjust the volume further on.

    Perhaps start clean, and do the following, as suggestions:

    How to play music in your main menu, and different music in any other level
    Solution: Make an actor in the Inspector, call it Music Playing and double-click it. Drag a Play Music Behavior into its rules. In the editor for your main menu, drag this actor onto the level screen but outside of the screen area, so it doesn't show when the game is playing. Double click the actor to go to its editor/rules window. Unlock it. Find your music in the drop down menu of the Play Music Behavior. Set the music to loop, if you want this to happen.

    In all your other levels, do exactly the same, changing the music you want playing for that particular level from the drop down menu of the Play music Behavior.

    THat's it; when you go to another level from the main menu, the different music will take over and start to play.

    As for pausing music, use the Pause Music behaviour and when you want to start the music again, drag a Play Music behaviour to the Rules and it'll say: Resume Current Music.

    For changing the volume, that's relatively straightforward but will take too long to explain here - sorry - (and there's more than 1 way to do this).

    Enough to say that one way would be to make 10 buttons, marked 0 to 10 ( or ten transparent buttons over one image showing 1 to 10). In each button, put Rule: when Touch is pressed, Change Attribute game.Audio.Music Volume to 0, 0.1, 0.2, 0.3, etc; depending on which button the rules are in.

    You can do the same for the Sound volume, except use Change Attribute game.Audio.Sound Volume instead.

    Hope those last instructions didn't confuse you; I'd make a test for you if I had time, but I know I won't have time today.

    Good luck, I hope you get it sorted now.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kajutokajuto Member Posts: 314
    HI there!!!!!! sorry for taking me so long to write it back for u, i tried what you told me, works from the beginning to the sentence that start :

    (For changing the volume, that's relatively straightforward but will take too long to explain here - sorry - (and there's more than 1 way to do this).
    Enough to say that one way would be to make 10 buttons, marked 0 to 10 ( or ten transparent buttons over one image showing 1 to 10). In each button, put Rule: when Touch is pressed, Change Attribute game.Audio.Music Volume to 0, 0.1, 0.2, 0.3, etc; depending on which button the rules are in.
    You can do the same for the Sound volume, except use Change Attribute game.Audio.Sound Volume instead.
    Hope those last instructions didn't confuse you; I'd make a test for you if I had time, but I know I won't have time today.
    Good luck, I hope you get it sorted now.)

    I put a Music Playing the Main menu, main menu to option menu or any other menu, when i come back, it's start playing the music again instead of continuing playing where it left off that;s the first prob, how can i resolve this??

    second, in the main menu i go to world menu and then level menu, the music keep playing that's fine, but after i go playing and come back to the level menu, it doesn't resume the music (even i put the Music Playing Actor to resume the music) where it left off of the music playing actor (music background)in the world menu it's doesn't either, but when i go to main menu it's start again, how can i fix that?

    I want start playing music background when it start in the main menu, no matter what menu (scene i go keep playing - that;s already works) but every time i come back Resume the music background where it left off

    there is another way to make the slider button for music and sound that if i slide to the left turn the music/sound off and to the right turn music/sound on instead of making all the button for each vol like u said in the paragraph in the top???? and all the music and sound that i turn on/off apply for the whole game, not only of One Scene

    Help Please
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    Hi again' OK, thought you wanted the volume reduced or increased incrementally...

    So for a slider, your best best is to check out one of templates available; there's two I can think of: @FireMapleGames and @Tshirtbooth. Find one of them and check it out and it'll be just right for you. (One of them's called Volume Slider, I think).

    ----------------------------------------------------------------------------
    iPad app: End of the Earth –•– http://davidgriffinapps.co.uk/
    ----------------------------------------------------------------------------

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • kajutokajuto Member Posts: 314
    Yes, I already saw the video and I did the volume slider of tshirtbooth and I miss one thing, how can I turn it on or off the music of background in the main menu also with sound effect same thing ? The slider works but it have no music or sound because I don't know how to connect with the music of background and the sound in the gameplay
Sign In or Register to comment.