User Tag List

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

Thread: "Else if" equivilant?

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

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "Else if" equivilant?

    For the sake of convenience, I would like to know if there's a way to create the equivilant of an Else If statement in MMF2.

    In my project, I have an alphabetical dropdown list of some 400 items. Most of them don't need much in the code, but about 20 of them require special coding. Because the list is in alphabetical order (to make it easier for the user), these 20 aren't all in one block, they're spread about. This isn't the problem. The problem is when I've coded all those, I need a general solution for all the others. At the moment the shortest way I can think to do it would be to have one event that includes all the previous ones negated. ie:

    Combo Select( "Combo Box" ) <> 32
    +Combo Select( "Combo Box" ) <> 65
    +Combo Select( "Combo Box" ) <> 122
    +Combo Select( "Combo Box" ) <> 234
    etc

    But with 20+ specially coded entries to negate in this line, this one event is going to be frankly enormous. So it would be easier if there was a way to group all the previous lines and then finish with an "Else if" to handle anything other than the ones previously coded. If this isn't possible atm, can I suggest it as a future update? :grin:


    Oh yeah, on an unrelated note: I downloaded the demo of MMF2D, and all my .mfa file associations changed to open with that. Now that I've uninstalled the demo, they haven't reverted to associate with MMF2 (just remaining as "Open With..." files). Is there a simple fix for this or will I need to reinstall MMF2?

    Cheers
    ~Raylax~

  2. #2
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    What I usually do is declare one global variable as "Else".

    Now before the complicated event I set else to 1. If the event is true, I set else to 0. In the next event, I check if else is still 1, and if that is the case I run my "else" actions. You can do that as often as you want in your code (as the events are processed sequentially).

    I think there are also extensions to get an effect like if/else. But as I try to use as few extensions as possible, that's too much trouble for me.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    I do what Random does

    ...but yeah, when it comes to programming stuff like this, MMF2 has some limits that I believe will improve a lot in MMF3

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

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    Oh, cool. I came up with another method too that I think should work. I'll have an "Always" condition for the generally coded stuff, and then the special coding things below that, overwritting the Always for those ones (seeing as the output is the to the same place, just the method different, it should work)

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    I hope we get the "make my game"-button as promised

  6. #6
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    Quote Originally Posted by Random
    I hope we get the "make my game"-button as promised
    Same here :grin:

    Also a "make what I'm trying to do work properly" button~

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module

    Join Date
    Jul 2006
    Location
    USA
    Posts
    658
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    and a "make my graphics look cool" option.

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    It's an odd way to go off-topic though, "else" is anything other than an "make my game for me" equivalent.

    I mean, c++ has else, and I'd love to see someone dare to call that a "make my software for me" tool

  9. #9
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    I'm not sure if this is possible but perhaps this will work.
    For each special item, enter the item name but add a non-diplaying character at the end. Then just check the name for the charater and you will know if it is a special one.

    I have not tested this however.

  10. #10
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "Else if" equivilant?

    Quote Originally Posted by Nifflas
    It's an odd way to go off-topic though, "else" is anything other than an "make my game for me" equivalent.
    exactly

    the lack of a proper else and elseif system makes things more convoluted than they need to be; the current way of "reversing" comparison operators makes MMF reevaluate conditions that it shouldn't need to

Page 1 of 2 1 2 LastLast

Similar Threads

  1. "Cannot load joystick2.mfx" when "Compress the runtime" unchecked. Fine when checked.
    By DistantJ in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 14th September 2013, 09:44 PM
  2. "Rendertarget ping/pong" and "Pixel shaders" Can TGF2 do this?
    By CloudExSolider in forum The Games Factory 2 - Technical Support
    Replies: 13
    Last Post: 7th April 2013, 08:21 PM
  3. iOS Video: "stopped" and "paused" events don't work?
    By smart_fr in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 25th August 2012, 01:03 AM
  4. "Bug" For Saving and Loading Frame Positions AND "Timer Glitch"?
    By Zarpo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 27th March 2012, 12:40 PM
  5. Issues with "Clickteam Movement Controller" and "Runtime" Object
    By jimmyorpheus in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 29th November 2011, 07:10 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
  •