User Tag List

Results 1 to 5 of 5

Thread: why this OR expression wo'nt work

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2006
    Posts
    261
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why this OR expression wo'nt work

    attached is a screenshot of the example
    just doesn't work right why?
    Images attachées Images attachées

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    374
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi, for line 2 you can have if EditValue is different from 3. Otherwise you could separate it like this:Screenshot (26).jpg

  3. #3
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2015
    Location
    Australia
    Posts
    169
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    using OR in the expression editor is different to the OR condition in the event editor (the working solution @Lukiester posted)

    in the expression editor, OR uses logic operators, a special way of performing simple logic checks

    the OR operator checks to see if two values are at least a 1, that is:
    0 OR 0 = 0
    1 OR 0 = 1
    0 OR 1 = 1
    1 OR 1 = 1

    as far as I can tell, Fusion treats numbers >1 the same as a 1 in logic operations - meaning "Edit Value == 0 OR 1 OR 2" is the same as checking "Edit Value == 1"

    there are other operators as well, such as AND (which gives you a 1 if both numbers are a 1) and XOR (which gives you a 1 if one but *not* both are 1)
    eg.
    1 AND 1 = 0
    0 AND 1 = 0
    1 AND 0 = 0
    0 AND 0 = 1

    0 XOR 0 = 0
    1 XOR 0 = 1
    0 XOR 1 = 1
    1 XOR 1 = 0

    it's a bit confusing at first if you haven't come across them before, but they're very useful for comparing two flags in a single line in the expression editor. hope this provides a bit of an explanation

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2006
    Posts
    261
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanx Lukiester and Marbenx

    thanx Lukiester for the idea but i think ill try and shortcut it a bit and remove the ors
    at the end of day I've come up with this
    better.jpg
    don't know if right because it plays up when putting in each entry into a list with "Only one action when event loops" for each event
    betternot.jpg

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Jun 2014
    Posts
    33
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    As marbenx says, it's not that kind of "or". OR in an expression is a Bitwise OR (you can also do AND, XOR & I think NOT also). It just compares 2 values at a bit level to see if the bits at the corresponding positions of either value are set & returns the result.

    The best way to do what it looks like you're trying to do is to have the "Edit value ("edit box") = 1/2/4/whatever" each as separate conditions in one event, & use "or (logical)" between each one. It's in the same right click menu as the "negated" option.

Similar Threads

  1. Asking for a friend: Expression Editor won't appear/work at all!
    By DinnerSonic in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 15th June 2014, 11:11 PM
  2. Dialog Box Extension: If button clicked expression does not work
    By 2xD in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th December 2012, 06:49 AM
  3. Help with expression
    By Kentronisk in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 31st October 2012, 11:57 PM
  4. Help: need an expression
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 11th October 2012, 12:10 PM
  5. Expression doesn't work
    By Jarzka in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th April 2009, 06:55 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
  •