OR operators, differences and usage?
I looked at the help contents to find out about the OR operators, and how they worked. I still don't know the differences between OR (filtered) and OR (logical). Can someone explain to me the differences of how it is read?
For example, differences between:
Event 1
-Condition 1
OR
-Condition 2
Event 1
-Condition 1
OR (Logical)
-Condition 2
I was trying to fix my game using OR operators, but there were a few differences I noticed after using OR (filtered). I don't know if it was a mistake on my side, or if it was using the OR operators that changed it slightly.
Also, is there a limit on how many OR operators can be used per line of events in one condition? Or is it unlimited?
Re: OR operators, differences and usage?
Here's a showcase picture explaining the difference.
http://clickteam.info/looki/Pictures/OrDifferences.png
There's no OR limit. I'm not aware of any, that is.
Re: OR operators, differences and usage?
If you don't put ORs in then MMF2 will assume you mean AND instead.
Re: OR operators, differences and usage?
Looki, I set the same event as your picture. But, it seems not to work correctly.
http://www7a.biglobe.ne.jp/~bp-827z/.../ORnotwork.mfa
In this event, when the other object collides with the background, both are destroyed.
Re: OR operators, differences and usage?
Strange! That must be a bug. I am very sure the code is correct. I'll ask on Gwerdy Chat.
Re: OR operators, differences and usage?
It's because its destroying both objects no matter if red hits bg, or green hits bg. That's what I assumed when experimenting with OR operators.
So I think what is happening is (if this is apparently a bug), the OR (filter) operator is acting like an OR (logical) operator as the bug. That's what I got when I looked at the image file of how the OR operators are supposed to work. Am I right on this?
Re: OR operators, differences and usage?
Yeah OR (filtered) has had object selecting issues for me too, but use it anyway and hope it works correctly!
Re: OR operators, differences and usage?
It works correctly if you use "is overlapping backdrop" instead of "collides with backdrop".
CT?
Re: OR operators, differences and usage?
"Collides with backdrop" is a true condition, they shouldn't be used with filtered OR's.
The reason why only false conditions work with filtered OR's is that MMF2 must check all the conditions in the event to filter out the objects to perform the actions to. However, true (red) events aren't checked on demand like this. Just because one collision condition in the event triggered, MMF2 can't just check the other collision event under the OR, because it's a true event. True events are triggered when the collision actually occurs, and the event may even run out of the event order.
Re: OR operators, differences and usage?
I don't think "collides with backdrop" is a true(?) condition/trigger. It's not red. It's only true for one frame, but it's no triggered condition.