User Tag List

Results 1 to 3 of 3

Thread: Start loop as an object's action, like a function?

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2006
    Location
    Montreal, Canada
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Start loop as an object's action, like a function?

    I have an idea for an interesting feature in MMF2.
    Basically, it's the possibility to run a "one-time" loop as an object's action, specifying a parameter instead of a number of steps, like a function.

    Since it would be an object action, this would make it possible to make "custom actions" that get executed for each object selected in an event, like any other actions are executed in MMF.
    And the function condition would select the object that called it.

    So let's say that I have a bunch of active objects in my frame and I make an event for those that are on the lower half of the frame. Each of the selected object instance would call the function (or one-time loop) having it run once for each selected object. And the function itself would be a series of events with the object's function condition on top. And instead of a loop index value, it's a parameter that can be used by the function.

    Also maybe it would be possible to use it with qualifier events, so that calling a function for a qualifier would run it for each of the selected members of the group, with their own version of the function.


    Here's the basic idea for events: (ET = edit time, RT = runtime)

    Object condition, On function
    ET- Asks an expression for the string name of the function
    RT- Runs when called from the object's actions, and re-selects the object that called the function.

    Object action, Call function
    ET- Asks an expression for the string name of the function
    ET- Asks an expression for the integer or float parameter that the function can use
    RT- Immediately runs the series of events with the "On function" condition that has the same string name, for each selected objects in the current event.
    RT- Will finish and continue to the next actions once the function is ended.

    Object action, Stop current function
    RT- Finish the current event, but skips all the other events with the "On function" condition of the same name. (making them false)

    Object action, Repeat current function
    RT- Restart the series of events with the "On function" condition of the same name, from the top. (To make a looping function)

    Object action, Change current parameter
    ET- Asks an expression for the integer or float parameter that the current running function can use.

    Object expression, functionParam("object","function")
    ET- Asks an expression for the string name of the function
    RT- Returns the current value of the specified function's parameter.


    All of that is very similar to what loops already are, but with using MMF's built in object selection features.
    Would this be possible for future MMF2 build?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    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
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Start loop as an object's action, like a funct

    It might be possible, I'm not sure. The problem is that when MMF2 goes off to do a fastloop, when it returns to where it left it has forgotten some stuff - such as which object instances are selected. So basically Clickteam would have to develop a better system of saving where it had got to so it can then properly resume. So it may need major re-workings of the event processing system - I don't know.
    .:::.Joshtek.:::.

  3. #3
    Clicker Multimedia Fusion 2 Developer

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

    Re: Start loop as an object's action, like a funct

    I'm fairly sure I could fix the "selection reset after a triggered condition (eg loop)" problem, using code from the select object to remember what was selected before the event and re-select it again after.

    But I don't have the time.

Similar Threads

  1. Replace a function with a loop!
    By ogrgkyle in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 28th October 2013, 09:05 PM
  2. Save more object in array with loop function part2
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 16th September 2013, 08:30 PM
  3. Action loop possibility to reduce slowdown?
    By Kid_Roleplay in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 8th March 2013, 02:33 AM
  4. Super Function vs Fast Loop
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th June 2010, 06:47 PM
  5. Start loop "loop" 'Alterable Value A' times
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 9th May 2009, 07:26 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
  •