GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Toogle True False

daverennerdaverenner Posts: 133Member
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.Posts: 6,577Member, Sous Chef, PRO
    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 Posts: 2,402Member
    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 Posts: 313Member
    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 :)
This discussion has been closed.