Sound Button Issue Help

kajutokajuto Member Posts: 314
edited July 2012 in Miscellaneous
Good morning everyone!! i recently made the Sound Button to turn either on or off, because my game button every time the player press let say, option button it have a sound and change to the option scene, but there is a problem with that, as i said earlier when i press 2 times any button with sound after that it WON'T have sound in any others button. For example i press option button (it sound) , change back to main menu and then press play button (it sound), but after that no matter where and how many time i press any other button it won't have sound. UNTIL when i go to the option menu i press Sound Button On/Off after that every time i pressed a button it have sound, here is the code: THanks Advance

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

what i'm missing?? or maybe i have to add something???

thanks...
Sign In or Register to comment.