User Tag List

Results 1 to 7 of 7

Thread: Creating 4 Instances at 1 Instace

  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)

    Creating 4 Instances at 1 Instace

    Hi
    I have a 'Ball Object' which falls down from the top of the screen.
    ...

    1 - As the first specific Ball Instace enters the Frame, i want 4 other Ball Instances to be created at its possition.
    2 - I also want the new Ball Instances to inherrit any AltValues from the Original Ball Instance.

    ...
    Is this possible?
    How can i do this?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    King_Cool, I don't know if this is what you're looking to do, but I made an example if I'm understanding what you want to happen. Not sure if this will work for you though.
    Attached files Attached files

  3. #3
    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)
    Thats not quite it.
    Ill try and make a better example.

    ...
    WHAT I HAVE
    - 1 Active Object "BALL" ( relevant AltValues A - C )

    THE SETUP
    - There is only 1 BALL instance present at the start of Frame ( we will call this particular Instance the "Original BALL" )
    - Alterable Values A - D of the Original Ball is set to random

    WHAT I WANT: WHEN PRESSING SPACE
    - 4 new BALL Instances should be created at the 'Original Balls' location
    - The 4 newly created BALL instances should also inherrit the Alterable Values A - C from the 'Original BALL'

    EXAMPLE
    https://dl.dropbox.com/u/3537859/CopyingInstance.mfa
    ( My problem is i dont know how to inherrit the Alterable Values from the 'Original Instance' directly, without going through some sort of "middle man" along the way )

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleUnicode Add-on
    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)
    AyreGuitar's Avatar
    Join Date
    Jan 2011
    Location
    Wales, UK
    Posts
    1,113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    King_Cool - What's wrong with using some sort of '"middle man" along the way? I can't think of any other way to do it, because you need to specify values from your original ball and the newly created balls which is difficult because they're instances of the same object. Just store the coordinates and AltVals in Global Alt Vals (or Alt Vals of another Object) and then refer to those values after creating the new balls.

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2011
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    isn't this possible?

    +press space
    -set value "ballcreator" @ original ball to 4

    +is value "ballcreator" > 0
    -Create Ball @ original ball
    - set all values from ball to original ball

  6. #6
    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 Morbus Crohn View Post
    isn't this possible?

    +press space
    -set value "ballcreator" @ original ball to 4

    +is value "ballcreator" > 0
    -Create Ball @ original ball
    - set all values from ball to original ball
    Doesnt look like that will work ( keep in mind i havent actually tried it ).

    AyreGuitar, you may be right.

    Isnt it possible to use 'MMF2s natural instance selection' or maybe combined with 'data leeching' to solve this?

  7. #7
    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)
    Create 3 global values, call them tempa... tempc or something.

    When the first ball enters, store its values in those globals. Next create your first spawned ball, setting its values to the global ones. Then create the second one and so on. That should be all that you need to do and you can do it via a loop that way too, although if you doso, you'll need potentially store the x & y of the initial ball in globals too, as loops don't inherit the object selection from their calling event.

    Also, note well... if you call a loop in an event, when you return to the event at the action after the loop call, any objects selected by the event's conditions will be essentially unselected, so anything like "set ball alt a to 1" will then act on ALL balls in the frame.

Similar Threads

  1. Objects and instances?
    By danielfre in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 7th August 2011, 08:54 PM
  2. Multiple instances of app.
    By Bruto in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 16th April 2008, 04:03 AM
  3. How to look across many instances of an object?
    By jrochelle in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 30th June 2007, 03:37 AM
  4. troubles with instances
    By Arima in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 28th June 2007, 04:17 AM
  5. Help with selecting instances
    By Simion32 in forum File Archive
    Replies: 0
    Last Post: 14th April 2007, 07:44 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
  •