How to make a button with boolean
Phoenix256
Member Posts: 42
Hey I'm trying to create a button that can be pressed and it does something and then I press it again it will go back to the original, so how can I make a Boolean go from true to false and back to true?
Comments
Use an integer instead.
When pressed change X to 1-X
sorry I don't think I understand what your trying to say
This question was answered numerous times in numerous ways with screen shots and demos in your other thread.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
but it never works all it does is changes but when I press it again it does nothing every way I try.
"how can I make a Boolean go from true to false and back to true?"
Use an Integer attribute instead of using a Boolean attribute.
Let's call this integer attribute 'X'.
Then use the following rule:
When touch is pressed: Change attribute X to 1-X
This will change X between 0 and 1.
Until we see the logic you're using, we can't help much. We've told you at least 3 different ways to do it that do work. If it isn't working for you, you've done something wrong. So you either need to keep trying to replicate the suggestions you've been given or give us more information about what you're actually doing, so we can try to tell you what it is you're doing wrong.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Finally I found an unblocked site, here are pictures of the way I have it set up, there are two because it wouldn't fit.