User Tag List

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

Thread: Expression editor help needed

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Expression editor help needed

    Alright... basically, I want something like this:

    (15 - 30) + 5

    ...to come out as a final value of 5. Obviously, it will give me -10. Is there a way to discount that which is in parentheses if it's under 0 while keeping it all as one expression?

  2. #2
    No Products Registered

    Join Date
    Jun 2006
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor help needed

    Well, if in the final application the values come from counters or objects, just don't make that formula if the right number in the paranthesis is larger than the left...?

  3. #3
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor help needed

    I know I can do that, I was more curious than anything-- although I do have to go back and edit 100 or so events in that case.

  4. #4
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,735
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)

    Re: Expression editor help needed

    Hi there,

    if I am understanding you correctly, yes you can do a conditional like that... using the Immediate If object (which I will call IIF for the purposes of keeping this compact)

    simply use the following:

    CompareIntegers( "IIF", (15-30), "<", 0, 5, (15-30)+5)

    This is the "compare integers" -> "return an integer" expression of the object.

    The first argument (after the object name "IIF") is the number to test (15-30), the second is "<" the test to perform, the third is the test variable (0), the fourth is the number to be returned if the test is True [ie. (15-30) is < 0] and the fifth is the number returned if the test is False.

    That should about do it, providing I've not misunderstood your question of course! <img src="/center/images/graemlins/smile.gif" alt="" />

    []Alright... basically, I want something like this:

    (15 - 30) + 5

    ...to come out as a final value of 5. Obviously, it will give me -10. Is there a way to discount that which is in parentheses if it's under 0 while keeping it all as one expression? [/]

  5. #5
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor help needed

    Thanks, but is the Immediate If object available for MMF2 though? It doesn't seem to be.

    I'll just do it the old fashioned way.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor help needed

    []Alright... basically, I want something like this:

    (15 - 30) + 5

    ...to come out as a final value of 5. Obviously, it will give me -10. Is there a way to discount that which is in parentheses if it's under 0 while keeping it all as one expression? [/]

    Wait! There is an easier way of doing this!

    Max(15-30, 0) + 5

    There ya go ^_^

  7. #7
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor help needed

    Aww, read Walrus's reply too late. <img src="/center/images/graemlins/frown.gif" alt="" /> Good to know for the future, though.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor help needed

    []Aww, read Walrus's reply too late. <img src="/center/images/graemlins/frown.gif" alt="" /> Good to know for the future, though. [/]

    lol <img src="/center/images/graemlins/tongue.gif" alt="" />

    Well also keep in mind that there is a Min() function too!

  9. #9
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,735
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)

    Re: Expression editor help needed

    Yes, IIF is indeed available free from the Bumderland website at: http://www.bumderland.com/objects/index.html

    I forgot about max &amp; min there! <img src="/center/images/graemlins/smile.gif" alt="" />

  10. #10
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor help needed

    lol <img src="/center/images/graemlins/tongue.gif" alt="" />
    Max() and Min() are a really basics functions...

    Besides, IIF is available for MMF2 but, use it only if it's required <img src="/center/images/graemlins/wink.gif" alt="" />

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Expression Editor and Icon Editor
    By OldGuy in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 27th September 2008, 01:21 AM
  2. A little bug in Expression Editor
    By JoKa in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 25th September 2008, 10:19 PM
  3. Backbutton and Navi in Expression Editor needed
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st January 2008, 12:57 PM
  4. Expression Editor
    By Kid_Roleplay in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 27th October 2006, 11:34 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
  •