Music and Sound Button

kajutokajuto Member Posts: 314
edited February 2012 in Miscellaneous
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

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    make a attribute called musicOff and a attribute called soundOff

    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
Sign In or Register to comment.