User Tag List

Results 1 to 6 of 6

Thread: Or operator

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jun 2006
    Location
    Norway
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Or operator

    Can someone explain to me, or direct me to some article;
    - How to properly use the "OR operator" (eg. where do I place it in the event stack to to properly communicate two different events)
    - How it works
    - The difference between filtered and logical operations.

  2. #2
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    702
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Or operator

    The OR operators

    A new feature has appeared in Multimedia Fusion 2 Developer since build 244 : the OR operators. The OR operators can simplify a lot your program of events by allowing you to group actions on a single line of events.

    The OR operator must be inserted in the group of conditions of an event, like this :

    + Condition 1
    + Condition 2
    OR
    + Condition 3
    OR
    + Condition 4
    + Condition 5

    Upon runtime, this group of events will be true when (Condition 1 and Condition 2) is true, OR Condition 3 is true OR (Condition 4 and Condition 5) is true. If any (or several of them) of these groups of conditions is true, the actions are executed. As you can see, the OR operator allows you to group actions in one line of event instead of being obliged to duplicate them on several lines.

    Two kinds of OR
    Multimedia Fusion 2 Developer provides two kinds of OR operators, the filtered OR and the logical OR. They work differently and you should understand them before doing complex programming. The difference lays in the way the objects are selected by the conditions.

    The Filtered OR operator
    This is the operator you should use in most of the cases. Imagine the following conditions and actions :

    + Mouse is over object 1
    OR (filtered)
    + Mouse is over object 2
    - Destroy object 1
    - Destroy object 2

    If the mouse is over object 1, then object 1 is destroyed, but object 2 remains there. If the mouse is over object 2, object 2 is destroyed but object 1 remains there. The filtered OR operator explores all the conditions of the event, and marks all the objects as inspected. The objects contained in false condition are marked as well, but the action related to them will not occur. This is the reason why actions in a event with the filtered OR operator will only affect the objects selected in the conditions that are true.

    The Logical OR operator
    This operator does not mark the objects in false conditions. As the objects are not marked, the default behavior of Multimedia Fusion 2 Developer when it encounters an action dealing with non-marked objects, is to affect ALL the occurences of the given objects. In our example, if we replace the filtered OR by a logical OR, you will have as a result :
    If the mouse is over object 1, then both objects are destroyed, if the object is over object 2, then both objects are destroyed. Imagine mouse is over object 1, object 1 is selected. The actions are called. The Destroy object 1 action finds a selected object (the one under the mouse) and deletes it. The Destroy object 2 action find NO selected object: it destroys all the occurences of object 2.

    Using either one of the OR operator is up to you, and it depends on the program you are making.

    -- From the help file.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jun 2006
    Location
    Norway
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Or operator

    Thanks!

  4. #4
    macwin
    Guest

    Re: Or operator

    I would make you a gold statue, you have resolved me an atrocious doubt, a million of thanks.

  5. #5
    No Products Registered

    Join Date
    Apr 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My trial version doesn't respond to the AND operation ( it shows as a distorted + sign ). I used it with Layer Object. Is this because I am using a demo version? Also how do I access my objects ones I have added them into the layer object? Any hints will be helpful thanks in advance.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,308
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I never understood the 'OR (logical)' operator. I always used the filtered one. Someone sent me a picture of how the Logical & Filtered OR operators are supposed to work some time ago, but instead ended up working completely different. I don't know if the pic I have is still relevant or not as of the last build of MMF2. :-/

Similar Threads

  1. Logical NOT operator
    By SuperDisk in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th September 2016, 11:56 AM
  2. Calendar Between Dates or AND Operator
    By Kracker in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 9th April 2012, 03:46 AM
  3. [AND] Operator
    By Nicolyto77 in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd January 2009, 12:11 AM
  4. Or Operator
    By Kalnar in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 19th November 2007, 12:08 AM
  5. AND operator in tgf2?
    By delusan in forum The Games Factory 2 - Technical Support
    Replies: 6
    Last Post: 28th May 2007, 08:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •