User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: Yposition = A 'or' B

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Yposition = A 'or' B

    Is it possible to make an expression like:

    Yposition = A 'or' B

    in the Expression Editor?

  2. #2
    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)
    Depends on what A or B is in your case.
    If you mean 'Alterable Value A or [Object]', or 'Alterable Value B or [Object]', then yes.

    Otherwise I don't know what you mean.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Yes, with some preparation you can do it easily.
    First set a value to Random(2). It could be a counter or an alterable value.

    Then you can use this value in the expression editor like this:

    Yposition = (a * RandomValue) + (b * (1 - RandomValue))


    You have now two possible scenarios:

    If RandomValue was 0, the formula would produce b, as seen below:
    Yposition = (a * 0) + (b * (1 - 0)) = b

    If RandomValue was 1, the formula would produce a, as seen below:
    Yposition = (a * 1) + (b * (1 - 1)) = a

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To clarify:

    I want 'something' to happen when ObjectAs Yposition = 50 or when ObjectAs Yposition = 100
    I know of two ways to do this.

    ...

    ( Method 1 )
    If ObjectAs Yposition = 50
    --> 'something'

    If ObjectAs Yposition = 100
    --> 'something'

    ...

    ( Method 2 )
    If ObjectAs Yposition = 50
    OR ( logical )
    If ObjectAs Yposition = 100
    --> 'something'

    ...

    But i am looking for a way to do this in 1 expression, like this:

    If ObjectAs Yposition = 50 or 100
    --> 'something'

    ...

    Popcorn, your suggestion is interesting but i dont think it will work, since when i generate a random number 'something' will trigger 'only' if Y = A or 'only' if Y = B ( only 1 of the 2 possible scenarios will trigger )

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    But that was what you were asking for. So what you really want to do, is have one expression for if Y = A or B or C or D or even more alternatives?

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    King_Cool, there is no way to include an OR operator on a single condition. The only way, as you mentioned, is to create 2 separate events with identical actions or to add an OR (filtered) or OR (logical) to your event between your conditions. Hopefully this feature will be added in MMF3.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Popcorn View Post
    But that was what you were asking for. So what you really want to do, is have one expression for if Y = A or B or C or D or even more alternatives?
    Yes, thats what i want to do
    ...
    OK so i went ahead and used this method:

    If ObjectAs Yposition = 50
    OR ( logical )
    If ObjectAs Yposition = 100

    It works perfectly, but it also illustrates why im asking about this in the first place:

    Its a big event, but the importaint thing is it works.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Y mod 50 == 0
    Y > 0
    Y <= 100

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    oruga's Avatar
    Join Date
    Feb 2012
    Posts
    366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually I just checked and it is possible to do it, on the expression editor just go to misc and you can select Bit-wise OR and that's it.

    or just write it OR

    + compare y position "Active" to a value -> equal -> Alterable Value A( "Active" ) or Alterable Value B( "Active" )

  10. #10
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    That is bit wise or, not logical or. It does a bitwise OR operation on the bits, it doesn't account for there being two different things you want to check against.
    Working as fast as I can on Fusion 3

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Cropping object as it walks past YPosition
    By Jase in forum Hardware Accelerated Runtime
    Replies: 5
    Last Post: 16th May 2011, 01:31 AM

Posting Permissions

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