Need help with simple rule [SOLVED]

BasGoodboyBasGoodboy Member, PRO Posts: 310
edited June 2014 in Working with GS (Mac)

Hey all,

All I want is one touch on a button > boolean goes true,
second touch on the same button > boolean goes false.

Like this I can make a menu open on one click, and make it close on two clicks.

Please help.

Goodboi Gamestudios | Monster Jumper now on the App Store

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    edited June 2014
    when touch is pressed
       Change Attribute: myBooleanAttribute To: not(myBooleanAttribute)
    
  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    Hi @RThurman, this does not work??

    I made not when touch is pressed:
    Change attribute game.Shop to not(game.Shop)

    If I click it ingame now, it does go to true, and opens the Shop, but another click won't set it to false again??

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • BasGoodboyBasGoodboy Member, PRO Posts: 310

    It does work! My bad, thanks a lot lot lot man for your fast answer!

    Goodboi Gamestudios | Monster Jumper now on the App Store

  • natzuurnatzuur Member Posts: 304

    @RThurman said:
    when touch is pressed
    Change Attribute: myBooleanAttribute To: not(myBooleanAttribute)

    Didn't know you could use logical operators in the expression editor. Very cool.

Sign In or Register to comment.