User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22

Thread: Object pairing / attachment (moved from Fusion 3 Progress thread)

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Object pairing / attachment (moved from Fusion 3 Progress thread)

    Not sure if this has been covered before, but probably my main thing I want in Fusion 3 is to be able to "pair" items to each other as it is in my experience the most pain to do in Fusion 2.5. Things like having individual enemies having other objects paired to them like for example their weapon in their hand (or a hat etc) as a separate item that belong to them (or just a health bar above their head that belongs to them etc). That is a major pain to do for me now in 2.5 and I have not fully understood how to do it properly. Even things like also having them tied together on the same layer etc, as if you would do anything like this now and having a bunch of enemies and their weapons one enemy could be behind another enemy but the weapon their are holding would be in front of the other enemy so it would look all messed up.

    Also just curious since some of my games are "idle" games that relies on very high numbers, will the number limit be higher in Fusion 3 vs Fusion 2.5?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,282
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Just to point it out, pairing is very straight forward in Fusion but requires the child objects reserve an alterable value to store their parent's fixed value. You then position the children with a parent fixed comparison. It is also easy with healthbars if you use active objects instead of counter objects. Maybe start a new thread if you don't understand how to do the pairing?

  3. #3
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,645
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Outcast View Post
    Not sure if this has been covered before, but probably my main thing I want in Fusion 3 is to be able to "pair" items to each other as it is in my experience the most pain to do in Fusion 2.5. Things like having individual enemies having other objects paired to them like for example their weapon in their hand (or a hat etc) as a separate item that belong to them (or just a health bar above their head that belongs to them etc). That is a major pain to do for me now in 2.5 and I have not fully understood how to do it properly. Even things like also having them tied together on the same layer etc, as if you would do anything like this now and having a bunch of enemies and their weapons one enemy could be behind another enemy but the weapon their are holding would be in front of the other enemy so it would look all messed up.

    Also just curious since some of my games are "idle" games that relies on very high numbers, will the number limit be higher in Fusion 3 vs Fusion 2.5?
    Fusion 3 will be able to handle object inheritance in a whole new way, allowing for complex kinematic transformations and so on, so I'm sure you'll be happy with that. However...

    Fusion 2.5 actually has object pairing built in (from all the way back to MMF1 I believe) and it is SUPER easy - but for some reason it doesn't seem to be talked about much anywhere. So, I have made a fully commented example to demonstrate this for you all!





    The mfa example is attached to this post for you to check out.
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Thank you Simon. What exactly is it that pairs the object though? Is it the loop? And how would one pair objects at later stages in the game (not at start of frame), just by running another loop?

    Also how would one say for example destroy one of the enemies (by clicking on him) and have his items also be destroyed?

  5. #5
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,645
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    Hey Outcast, you're welcome. No the parent child relationship is created by the act of creation of the child object, relative to the parent (when the parent is specifically scoped in the conditions). You can select which parent objects however you like in the events, so you could have 6 enemies, spread the value 0 into alterable value a of those enemies and then select just half of them, using an event: alterable value a <= 2

    The loop is just a convenient way to go through each one in my example, to get a number 1 to 6, to label the player and select the frame 1-6 from the Stopped animation also.

    So at a later stage in your game, you could add more objects, simply by selecting the relevant enemy in your conditions and creating the new child objects relative to the enemy - it doesn't matter when you perform this in your frame.

  6. #6
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,645
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    I just tested a delete on the player - the pairing doesn't seem to handle the delete function, although I may be missing something there on how to do that. In that instance, I would simply store the parent's fixed value in an alterable value of each item you connect to the parent and then when it comes to deletion you can just do:



    I realise you're still having to do some of what you mentioned before there. I always remind people though that with things like this that where Fusion and other tools can do a lot of the magic for you, creating your own logic and object handling will always be necessary to some degree no matter what system it is. I'll check with Yves whether there's a way to specifically select those objects by selecting the parent too.

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,282
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Simon: I was going to mention that this "automatic pairing" is really only useful for extremely basic use. It works well if you are pairing things that always maintain the exact same number of components and never add or subtract new instances of those components into the frame. So for something like an ambient object that always sits in the scene and never gets removed (example, a cloud and its shadow) I could see using the automatic pairing. But in practical scenarios, you are going to have to understand how to force object selection and pair things through loops. And once you have gone down the more complex road, it becomes more confusing (and possibly less reliable) to use any automatic pairing Fusion does in parallel to manual pairing.

    To each their own, but I think the lack of discussion about this pairing is because very few people use it in normal situations. I would love to be proven wrong and see a great example of doing pairing without loops that works well for normal gameplay where these related object pairings are constantly being added and removed from the scene.

  8. #8
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,645
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    It is a basic tool of course - I've done some tests and it can work in conjunction with custom object attachment just fine. Again, it really depends on what you're using in your game and how complex you wish to get. If you wanted a troops health counter / building construction progress bar aligned to an object for example, this automatic pairing will work just fine - even in conjunction with more complex systems. Anyway, let's get back to F3 discussion here, I know I veered off slightly there

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    (This should work for delete:

    autopair_del.png

    autopair doesn't really establish a link between the instances involved, it just pair a number of object with another same number of object,
    you just have to make sure the number is always the same

    though I agree with mobichan on the limited use and generally prefer the foreach approach,
    but autopairing is still a powerful tool and should be sensibly faster than the "safer" instance-bounded approaches
    sorry for continuing the OT... )

  10. #10
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    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)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Of course, if Fusion had better support for a more object oriented programming approach, you wouldn't have to worry about pairing objects and keeping their id's synced. You wouldnt have to manually assign UIDs, create sub objects at runtime and keep track of them.
    Most mainstream game engines (Unity, godot, etc) all let you attach a script to an object, parent objects to other objects . When the parent is destroyed- so are all of its children. And most importantly- object instances can be created in the editor and given different variables from the default established in their script - letting the level designer pull out more variety from the existing code.

    I know you can attach an event sheet to some objects in fusion, but that has no access to the qualifiers. Also instance variables are worthless in the editor - you cant have them be with different variable values and share the same attached logic! These are by far it's biggest weaknesses atm imo.
    Making an active object global,you still have to manually copy it to every single frame you want it to exist. The whole scope in fusion bugs me, but I still use it because it is fun to prototype with.
    But good god, if fusion 3 lets me do things in a more object oriented way and has better instancing and code reusal, I wont miss fusion 2

    In general it would be great to get proper instancing- like the one you would find in other game engines

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •