Toogle True False

daverennerdaverenner Member Posts: 133
edited November -1 in Working with GS (Mac)
Is there an easy way to have 1 button, and if its True when you touch it, it toggles to false, and vice vera?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi Dave, that's no prob. you need a scene or a game boolean attribute. You leave it unchecked as false.

    So in the Rules of the button, put
    When Attribute SuchandSuch is false, then
    Change Attribute to true
    Other stuff you want like changing the image or size perhaps.

    Then in the Otherwise bit of this Rule, put
    When Attribute SuchandSuch is true, then
    Change Attribute to false
    Other stuff you want like change.

    Hope that helps. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • Rob2Rob2 Member Posts: 2,402
    another way is to just have a simple change attribute in your button as pointed out by CodeMonkey quite recently.

    change attribute game.toggle to 1 - game.toggle
  • ZackGSZackGS Member Posts: 313
    Rob2 said:
    another way is to just have a simple change attribute in your button as pointed out by CodeMonkey quite recently.

    change attribute game.toggle to 1 - game.toggle

    That is the best way to do a toggle for sure :)
Sign In or Register to comment.