change icon image when touch is pressed

trizerotrizero Member Posts: 6
edited November -1 in Working with GS (Mac)
1 change icon image1 to icon image2 when first touch is pressed. music OFF

2 change icon image2 to icon image1 when second touch is pressed music on

how to do this .?

Comments

  • magic101himagic101hi Member Posts: 713
    ok so make 1 attribute make it an interger and name them
    icons set it equal to 0
    then make 2 rules in the icon actor
    in the first rule put

    if touch is pressed
    and
    if atribute icons is = 0
    then
    change image to (icon2)
    and
    change attribute icons to 1

    in the other rule put

    if touch is pressed
    and
    if atribute icons is = 1
    then
    change image to (icon1)
    and
    change attribute icons to 0

    also follow TShirtBooths instructions

    yr welcome

    -Josh
  • trizerotrizero Member Posts: 6
    tshirtbooth said:
    yes

    make an attribute game.sound set to 0

    when touch is pressed
    change game.sound to (game.sound+1)%2

    rule if game.sound = 0
    change image to ???

    rule if game.sound = 1
    change image to ????

    Thank you ~ what type of the number ( attribute game.sound set to 0) ?
  • trizerotrizero Member Posts: 6
    magic101hi said:
    ok so make 1 attribute make it an interger and name them
    icons set it equal to 0
    then make 2 rules in the icon actor
    in the first rule put

    if touch is pressed
    and
    if atribute icons is = 0
    then
    change image to (icon2)
    and
    change attribute icons to 1

    in the other rule put

    if touch is pressed
    and
    if atribute icons is = 1
    then
    change image to (icon1)
    and
    change attribute icons to 0

    also follow TShirtBooths instructions

    yr welcome

    -Josh

Sign In or Register to comment.