User Tag List

Results 1 to 6 of 6

Thread: [idea] Condition Abbreviator

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [idea] Condition Abbreviator

    Just an idea if any of the extension developers are looking for something really simple to do.

    An object which takes many conditions and converts them into a single one with a name. E.g.


    1. Repeat while UP is NOT pressed
    + Repeat while DOWN is NOT pressed
    + Repeat while LEFT is NOT pressed
    + Repeat while RIGHT is NOT pressed
    --- Set "No arrows pressed" to TRUE


    Then you could follow with a set of events like:


    2. Player presses Fire 1
    + "No arrows pressed"
    --- Do some action

    3. Player presses Fire 1
    + "No arrows pressed"
    --- Do some other action that needs to be in a separate event

    4. Player presses Fire 1
    + "No arrows pressed"
    + Player is standing on ground
    --- Set the animation

    5. Player presses Fire 1
    + "No arrows pressed"
    + Player is NOT standing on ground
    --- Set the alternative animation


    In the above example, we've got several events that are all triggered by the same (or similar) sets of conditions, but which can't be lumped together for various reasons (in particular, when determining which animation best fits the fighter's current position).

    The extension can create its own custom-named condition which you trigger using an action. It's basically just a flag, but it's nameable, and easy to read from within the events.

    It also means any change to complex conditions can be made in just one place, and automatically affect several events that use it.

    Also, at the end of every frame, the extension would automatically reset all the conditions, ready for the next pass of the events.

    Just something that I know I'd find useful.

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: [idea] Condition Abbreviator

    I wonder if people would get confused if they set 4 conditions and MMF converted them to one condition in the display?

    I might like to see a new condition that consolidates the condition test into one line rather then having MMF do it.

    I also wonder how the editing interface would work if you decided you only wanted 3 of the arrows tested. It would take a bit of thought on how this would work in real use.

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [idea] Condition Abbreviator

    I'm not sure what you mean.

    The basic objectives of the extension would be:

    . Localising long or complicated conditions. If you're working on a formula that will be tested by many different events, but you know you'll have to tweak it a lot in the future, you can store it in just ONE event. That event would then be used as a reference for all the others, like a function. When you make changes to your formula, you would only need to make changes to that one event - no matter how many events actually use it.

    . Abbreviating long sets of conditions into a shorter-looking equivalent. So a whole bunch of conditions can become something as simple as "My big bunch of conditions"


    With that in mind, it could work this way:

    The developer defines a custom condition like this (lines in red are triggerable conditions):

    [color:#FF0000]* Define "My Condition"[/color]
    + Condition 1
    + Condition 2
    + ...
    + Condition 6
    --- Return TRUE

    The extension would have a 'Return TRUE' and 'Return FALSE' action.

    Then you could actually USE your new condition like this:

    * Player is not moving
    + "My Condition"
    --- Some actions

    When MMF reads the conditions, it comes across "My Condition" and asks the extension object "Are you true, or false?"

    The extension object says "Hang on, I'll check." So it tells MMF to wait, and triggers any 'Define "My Condition"' events, just as if it were running a fastloop.

    Once those 'Define' events have all run, they should execute the 'Return TRUE' or 'Return FALSE' action. If not, the extension assumes a default value, which can be set in the properties (default to true, default to false).

    The condition finally reads the TRUE/FALSE that was returned and gives it to MMF. MMF can then carry on to any other conditions that are lower down.


    If it could work that way, it'd be especially groovy, since you could actually execute actions from the conditions. So you could do this:

    * Define "Hello World"
    --- Set text of Edit Object to: 'Hello World'
    --- Return TRUE

    * Some Condition
    * Some other condition
    * "Hello World"
    * Yet another condition
    --- Actions

    And by the time we get to the final set of actions, the edit object would already say "Hello World".

    I can't imagine a use for that, but I'm sure someone'd find one! It could be handy just for making more complex conditions, where actions - maybe even loops - have to be run in order to return a TRUE or FALSE.

    I think it might ease a bit of the strain on extension developers too, since a lot of the 'just make life easy' extensions could be replicated using this (angle and movement extensions, for example).


    I think that'd be immensely useful!
    Although knowing my luck, it'll probably turn out that MMF2 can't actually trigger events whilst processing conditions. Hope there's a way though.

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [idea] Condition Abbreviator

    Triggering conditions from other conditions is bad.

    MMF forgets it's current object selection list after a call, so it would have to be recorded by the extension and reloaded after. Not impossible, I think, but out of range of most extension writers.

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

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

    Re: [idea] Condition Abbreviator

    This is the same overall idea I presented in allowing condition alias names to make code easier to read and understand. Interesting idea Dines.

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: [idea] Condition Abbreviator

    I think it'd be useful enough to consider Clickteam having a go at it. I've personally found MMF's a bit lacking on the actual programming front - it could do with being a bit more modular, and this could be a good start.

    I find 90% of bugs in my games are where I've failed to copy and paste changes to all the millions of places that they've been used. A simple pointer to just one event would save all that.

Similar Threads

  1. Else condition
    By FMistakes in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 27th July 2013, 10:22 AM
  2. Brilliant Idea! No idea how to implement!
    By ProdigyX in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 27th November 2011, 04:46 PM
  3. Is this condition possible?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th February 2011, 08:31 PM
  4. what do you do when a condition....
    By Lillmissthang in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 21st February 2010, 01:50 PM
  5. Idea: Stop testing condition if found
    By Blizna in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 15th November 2007, 06:13 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
  •