Make A Mute Button???
I've been working on this for a while and it seems like its not possible but I'm sure it is. It should be easy. What I want is to press a button, which cuts off sound and changes the image to a depressed button. Then when I press the depressed button, I want the sound to come back on and change the image back to the regular button image. I have no idea what to do. I tried one method where I had a rule that said
{if button is pressed & int=0,
change image (depressed button),
change attribute music&sound=0,
change attribute int=1}
otherwise (else)
{if button is pressed & int=1,
change image (back to normal image),
change attribute music&sound=1,
change attribute int=0}
Now this kind of worked. But if when I pressed the button the sound would get all choppy and then cut out. And when i pressed it again the sound would fade back in really choppy. Or the button had to be pressed multiple times for it to work. And if i held the button down it would fade in and out of the depressed and unpressed button image really fast.
Anyways I think that didnt work because the int's would cancel each other out or something. Any solutions as to how to go about this??
Comments
When touch is pressed:
Change attribute: devices.Music.Volume to 1-devices.Music.Volume
Then you can create a rule that says when devices.Music.Volume = 1,
Change image to button turned on
Otherwise,
Change image to button turned off.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
THANKS SO MUCH!
You're welcome. Glad it worked.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx