On and Off on the same Button, Help Please Thanks!

kajutokajuto Member Posts: 314
edited July 2012 in Miscellaneous
Hi there everyone and Thanks in Advance!!! i made a main menu which have a option button, play button and instruction button, each time i enter any button is okay except for the option button. WHen i enter Option button and go back to the main menu it turn off the sound...im dunno..help please

Option Button
Rule:
When Touch is pressed
-play sound
-change image
-change scene

Otherwise:
-change image

Sound Button On/Off
Rule:
When Touch is pressed
-change att : Game.SoundOn/Off to (game.soundOn/Off+1)%2
-play sound

Rule:
-Att. Game.SoundOn/Off = 1
-change att: game.Audio.SoundVolume to 1
OTHERWISE:
-change att: game.Audio.SoundVolume to 0

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    @kajuto

    Hi Kajuto, if you're using the Audio.SoundVolume, it's turning off all of the sounds, not just one; that's the reason you're having trouble, I think.

    This should help; amend your Rules to be like this:

    Option Button

    Rule: When Touch is pressed
    play sound
    change image -- to something else

    ----putting the change scene into touch released will make it less rushed, so------

    Rule: When Touch is released -----(or in the Otherwise section of the above Rule)---
    change image --- back to original image
    change scene

    Hope that's what you're after.

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

  • kajutokajuto Member Posts: 314
    Gyroscope thanks for the reply! i want when touch the Sound On/Off Button turn off all the sound but i dont know why each time i enter the Option Button and go back to the main menu all the sound turn off no matter i turn on or off the Sound On/Off Button....
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    OK, I see now what you're after.... (I really must start reading other people's posts properly... ;-)

    I'm still not completely sure why you need to turn off all the sounds but hey, if that's an option in your game, I can't argue!

    ......although maybe you're after turning off Music, rather than sounds?

    Anyhow, as long as your attribute game.soundOnOff is an integer, I can't see why you're having problems...

    Maybe rename it without the slash (as I've done above); a small thing, I know but it might have an effect....

    Here's one of many tutorials on using modulus for toggling; it's essentially what you already have but it might be of help...



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

  • kajutokajuto Member Posts: 314
    I'm working right now, but in the night I will try it thanks really an I appreciatte it . Btw do you have a website like Tshirtbooth ?! Let me know gyroscope
  • kajutokajuto Member Posts: 314
    @gyroscope

    Thanks for the video, btw do you have a web or something like Tshirtbooth?? it helped me out with my project. Thanks A lot! i appreciate it!
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    Glad I could be of some help. :-)
    @gyroscope

    Thanks for the video, btw do you have a web or something like Tshirtbooth?? it helped me out with my project. Thanks A lot! i appreciate it!
    I do have a website (the link for it shows under any one of my posts); it shows my writing and music stuff as well as the apps I've done/involved with.

    But as for being like @tshirtbooth 's website....... nooooooo!!! :P I couldn't get anywhere near what TSB's done and achieved with his many excellent tutorials on his site (not to mention the amount of games he's made - but I'll try to catch up to match that one day perhaps....) ;-)

    http://gshelper.com/ is totally worth bookmarking in your browser. :-)

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

  • J_PANJ_PAN Member Posts: 140
    yep tshirtbooth's website is really good, http://www.gshelper.com, it is full of free templates and templates that are really good (not free)
  • kajutokajuto Member Posts: 314
    @gyroscope Thanks!!! i have been fan of Tshirtbooth since 2010 lol i always looks in his website. but just in case you have one that it. i appreciate your help as always.

    @pan_joshua that true, i love his web. It's helped me a lot really, if you guys know any other web like Tshirtbooth let me know.. thanks a lot
  • kajutokajuto Member Posts: 314
    @gyroscope hi there!! sorry to bother you. I got to turn off all the sound i got for the main menu button but as you said, it turn off ALL, i just one to turn off all the Sound from main menu, option menu, tutorial menu, credit menu, world menu and level menu, because i got each button a sound, for example: Back button, play button, option button, tutorial button and so on...., BUT I DON'T WANT to TURN OFF the sound inside the gameplay
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012

    @kajuto No bother; no worries!

    Sorry for the delay in getting back to you, we've been away for a couple of days.

    If you want some sounds to only play once, make a boolean attribute to act as a switch for each one..
    So:
    when OptionPlay is false
    Play Sound
    Change attribute OptionPlay to true

    But... I'm still scratching my head to understand why you want these sounds to only play once; surely you want the sound to play every time the user presses the button?

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

  • kajutokajuto Member Posts: 314
    @gyroscope thanks!!!! a lot! lol don't scratched your head for something you don't know why the other people doing. sometime it don't have a explanation.

    by chance, is there any other way i can communicate with you more faster? like....skype, facebook, ect...
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited July 2012
    @gyroscope thanks!!!! a lot! lol don't scratched your head for something you don't know why the other people doing. sometime it don't have a explanation.
    OK! I can't argue with that!! :P

    by chance, is there any other way i can communicate with you more faster? like....skype, facebook, ect...
    I've always intended to use Skype but never got around to sorting it; I really can't be bothered with Facebook; so you're always welcome to email me (shown on my website). I'll try to help out if I can (and if I have the time).

    But having said that, ideally it's best you ask your questions here in the Forums; not only will you get other members' answers as well as mine, the answers given might help others. :-)

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

Sign In or Register to comment.