Boolean switcher
ncarlson29
Member Posts: 17
Right now I am trying to make a button that you can touch and it changes the image and when it is touched again it switches back, the way i have it set up is that if touch is released and if the button is not already true then make it true, that works fine, but then when I add in the next rule for turning it back off, which is false, it does not work anymore, is there any command that just switches booleans? For example, if it would just say change attribute "game.boolean" to the other true or false
Comments
Change Boolean to not(Boolean)
Use the mod function. I have a video on it. Click the Guru link in my signature.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Very helpful video @Lost_Oasis_Games thank you!
or
Change switch to 1-switch
He is using a boolean, so 1-boolean won't work, but change switch to not(switch) effectively does the same thing as 'change switch to 1-switch'.
I think My video many have convinced him to use and integer
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
If all the button does is switch between two states, then this is the correct answer. Anything else is just overcomplicating matters. There is no faster, easier or more efficient way of doing it than this.
I'm not sure why the method you were originally using didn't work, though - it should do if you've done what you've said. But @Sock's suggestion is a better way of doing it, anyway.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I never mentioned booleans your honour, was merely chucking out an alternate method
Guilty as accused, send him down, Timer: for 10 years.
It's not suprising you'd think that considering I stole the method from you
I stole it from someone else, I don't remember who though!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Hmmm.... I wonder who that could have been?
Lmao
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I'm afraid it wasn't you, @RThurman, I'd have remembered that I remember being surprised by the person I learned it from, but I don't remember who it actually was I think @ORBZ might have been the first to mention it, but I first saw someone else post about it (after @ORBZ's post, though).
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Just to slim the list down a bit...it wasnt me.
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
not(Thunder_Child)
Oh no you did NOT just grammar nazi me...
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
Not grammar nazism just a self-referential post modern lexiconic mobius-esque meta-notion, I think.
You are completely correct!
@Orbz introduced the use of not(). Unfortunately @Orbz edited the original example and took it out. But here is close to the spot where he first mentions it:
http://forums.gamesalad.com/discussion/comment/398408/#Comment_398408