True and false with only one button. How?

JlmCJlmC Member Posts: 129
edited November -1 in Working with GS (Mac)
The title say it all.

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    please explain what you are trying to do, i think you want to hit a single button and have it toggle between true and false right? I'm not sure how exactly to do that if you have a boolean, but you can easily have a switch toggle between 1 and 0
  • JlmCJlmC Member Posts: 129
    Exactly. Well, I want to use booblean, so i can not get confuse later. However, i think i gotta use real or interger.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yes you use a interger and set it to zero. ill call the attribute switch as a example

    Then in the button have a rule when touch is pressed change attribute switch to (switch+1)%2

    that will have it toggle between 0 and 1. So it starts at zero when you touch it it changes 1 then when you touch again it changes to zero and toggles between them
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You can use a bolean and just set it to interpolate the attribute over a duration of .1 seems like have done that before to get it to swtich back and forth but I kinda like johns method better I think I will try that next
Sign In or Register to comment.