2 Attachment(s)
Re: CORRECT way to Toggle!
There is usually not one correct way to do it. Attached are some alternatives (use space bar to trigger the examples). The first of my examples is the one most suitable for more than two states, so if you need to do that, replace 0-Display Object( "Toggle Grey" ) with (Display Object( "Toggle Grey" )+1) mod [number of states]
Re: CORRECT way to Toggle!
Re: CORRECT way to Toggle!
Re: CORRECT way to Toggle!
Quote:
Originally Posted by Nifflas
There is usually not one correct way to do it. Attached are some alternatives (use space bar to trigger the examples). The first of my examples is the one most suitable for more than two states, so if you need to do that, replace 0-Display Object( "Toggle Grey" ) with (Display Object( "Toggle Grey" )+1) mod [number of states]
You know I was thinking about using mod in a way like that. I'm always just a step behind!
-Variant
Re: CORRECT way to Toggle!
What you're talking about is "cycling" not "toggling".
Neither is "correct" or "better" - they're just used for two different purposes.
Re: CORRECT way to Toggle!
We should have a separate forum for these kind of threads. I love example threads or informative threads that show common mistakes or unique ways of doing things or even complex but basic things in mmf2, without looking through tutorials, of course.
2 Attachment(s)
Re: CORRECT way to Toggle!
Yes, I have had trouble with toggling... I found ways around it, but they seem messy. Is there anything significantly simpler than this example?
2 Attachment(s)
Re: CORRECT way to Toggle!
Does this do the same thing Lego Catcher?
Re: CORRECT way to Toggle!
Can't you just do user clicks on object: Toggle Flag 0? Then there is just one more event Flag 0 is on: Set position of active to Mouse, which I consider signifigantly simpler.
Re: CORRECT way to Toggle!
Wow yep. That's nice! I should'a thought of that! Thanks!
btw... it's legocacher (pronounced: lego-casher)
It is a takeoff of geocaching because i like legos and geocaching. The main root word is Cache like a computer cache.
Re: CORRECT way to Toggle!
as LB said. just something like press space - toggle flag(x) of an object.