manipulating any act. obj. that fits a condition
I'd like to manipulate all and any active objects that have some flag set ON. I can pick all objects based on their flag status, but from there I want to, for example, change the scale of the object(s).
So in the event editor (actually, I'd like to do this in the global event editor) I go to New Condition, I say "Pick objects with flag #4 on", and that sets up my condition. But then I want to set the scale of the flagged but UNSPECIFIED object(s) to, uh, 2. Well, where's the column in the event editor for "any objects picked by the condition", so I can go ahead and change the scale?
I'm basically trying to avoid a lot of hassle by applying the same cause-effect scenario to many different active objects. Can I do it? How?
Regards,
Mike
PS- I've casually enjoyed the Clickteam series since first trying out Klik & Play when the demo was included in my PC Gamer issue. Just bought MMF2 this week, and I'm in the process of experimenting to see what I can and can't do. So far I'm pleased. Nice forum here, but it doesn't seem like the Search feature works for me. :)
Re: manipulating any act. obj. that fits a condition
Just did a small test and in the one event added the action set scale to 2 in ALL objects (yep ticks under each one) but it only affected the ones that had had the flag set.
Alternatively give every object in your app that could have this affect them a qualifier, then just add the set scale action under the qualifier. This will only work in the frame events though as qualifiers don't work in the global events
Re: manipulating any act. obj. that fits a condition
Yep. A condition filters any objects so that the actions will only affect the ones that matched the conditions.
The gotcha is that objects mentioned in expressions (formulas) won't be filtered, and only ONE object of each of the types mentioned in a formula will be used in working out the result of the formula. Because of this, try to avoid using "compare two general values".
Re: manipulating any act. obj. that fits a condition
So to do it globally, I have to wait until I have all my objects added to my game, then under each object say "set scale" for that condition... Well, I was hoping for it to be a bit easier than that (one condition, one checkmark, and the ability to add objects as I go and have that event apply to them automatically), but at least I don't have to create new conditions for each object.
Why don't qualifiers work in global events?
Cheers,
Mike
Re: manipulating any act. obj. that fits a conditi
Did you try the condition under New Objects > Pick objects with reference to their value > Flags > On/Off ? Should work.
EDIT: Ah I think you're already using it. Sorry didn't read correctly.
Re: manipulating any act. obj. that fits a conditi
If an object isn't mentioned in a condition then it will always be affected by any actions on it, if that helps.
But it sounds like you're not using duplicates? Having multiple duplicates of the same object is much easier.
Alternatively, to treat different kinds of object as one object, select them all, go into their properties and add a qualifier to them. A qualifier shows up in the event editor as an object, and anything you do to it affects all the objects in the qualifier.
EDIT: ok, I re-read. Sounds like you know all this stuff.
Qualifiers don't work in global events because it doesn't know what kind of object the qualifier would be for, they don't just work on actives, but even counters and custom extensions and so on.
Re: manipulating any act. obj. that fits a conditi
If you use the same Qualifier for Multiple kinds of objects you get multiple qualifiers like "Group.Good.Active" etc. If they could use this system in Global events there shouldn't be any problems with object types.
Re: manipulating any act. obj. that fits a conditi
This might be my stupidity but could you not set an Alt value/string for each Act. and use it to filter the ones you want by using the spread value A.
X happens
+ Alt Val A = LoopIndex
> Alt string = "This one"
Alt string = "This One"
> Do Y
Or do I not understand?
Thanks,
K
Re: manipulating any act. obj. that fits a conditi
Agreed Werbad, and that would make my life slightly easier as well.
-Mike