Hi
I want this to happen as i select a Group member with a mouse click:
- All other Group members set Flag0 OFF
- Selected Group member set Flag0 ON
How can i do this?
Printable View
Hi
I want this to happen as i select a Group member with a mouse click:
- All other Group members set Flag0 OFF
- Selected Group member set Flag0 ON
How can i do this?
Not sure if this is the best way to do it but it did it.
Jeff, I never thought about doing it like that!
I'm always using fixed value for this. I don't know what's best, though. I guess it is a matter of taste :)
Cool Solution Popcorn!
That is one of the neat things about MMF -- many ways to approach a problem and in the end hopefully you find a way that works for your project :)
I would like to see more people come up with ways to solve this programming challenge!
Well since we are chipping in:
https://dl.dropbox.com/u/14962632/Pu...r%28Sky%29.mfa
Ah! I really like your solution Skyhunter! Nice work!
Here's how I'd do it.
Oh, very small detail Skyhunter, but if you need an alterable value to represent "No fixed value selected", use -1 instead of 0. From what I've heard, an object can in theory end up with a fixed value of 0, but even though objects can also end up with a negative fixed values, that value can never be -1 due to how the value is generated.
That "Clear filter" thing in Niffla's example sounds to me like something that should be built-in in MMF2. How on earth are the normal user going to figure out to put a dummy loop like that to clear the selection caused by the fastloop? Is the fastloops bugged or is it designed like this on purpose? Even though I understand how it works, I cannot see any logic reason why it starting a dummy loop should fix anything.
I agree with Popcorn, i really wonder how you ever managed to figure that one out. :)
And thanks for the fixed value info, i though they could never be 0.
Hmmm
So when a Group is clicked, all other Group members are excluded from the 'Group Referrance List' for the reminder of the entire Frame?
And to reset or "re-include" Group Members, you need to run a 'loop inside a loop'?
( Im guessing this also applies to Object in general )
Very interesting looking at all these different solutions to a common selection problem.
I'd have done something similar to Jeff's solution (working on iOS stuff I try to avoid fastloops)
Nifflas' solution is just plain bizarre, but very cool that it only takes 3 lines!
The "Clear Filter" hack exploits the fact that MMF2 clears the object selection when calling a fastloop. However, it seems MMF2 will ignore any event that doesn't have actions within (hence the "dummy loop") and the object selection won't be cleared if the "on loop" doesn't exist. Personally I'd be much happier if calling a fastloop didn't clear the object selection and we instead had a manual "clear filter" action. Because it currently works like it does I just always put a "clear filter" loop in the application so that I can call it whenever I need to do that.
Thought I'd give this a try too, before looking at others' solutions.
Similar to how Jeff did it, seems like, but different conditions. And I kept the flags too, as I presumed the flag status would be used for other conditions in the app/game later on, rather than comparing the objects' scale.