Music and Sound Button
kajuto
Member Posts: 314
How can i make Music and Sound button so when the player want to turn on/off whether each of them? Please help and thanks in advance
Comments
In your music off button have a rule when touch is pressed:
-change attribute musicOff to (musicOff+1)%2
In your sound off button have a rule when touch is pressed:
-change attribute soundOff to (soundOff+1)%2
Then have a rule when attribute musicOff=1
-change attribute device music volume to 0
Then in the otherwise section have:
-change attribute device music volume to 1
Then have a rule when attribute soundOff=1
-change attirbute device sound volume to 0
Then in the otherwise section have:
-change attribute device sound volume to 1
cheers