User Tag List

Results 1 to 10 of 10

Thread: Order of objects/layer object

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Order of objects/layer object

    Hi all, I have pretty much completed a game I have been working yet I cannot show it to anyone as the order of the objects (in front, behind, etc) is completely off. What is the easiest and most effective way to create a order hierarchy with many objects, most with multiple instances. I have been trying for weeks with no luck, i have tried the layer object and that didn't help either. I have tried the normal order but the reference has to exist (sometimes there is no instance of an object).

    Thanks so much, this is pretty urgent so id appreciate any help I can get

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,226
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)
    As a general rule, objects created at runtime are always "on top" in their respective layer. The Layer object is good to force specific ordering either by moving objects to a specific z position (1 being the back-most (0 is not used, ordering is 1-based)) or by sorting all objects in a layer based on y position. I find it helpful to keep an alterable value reserved for "z position" and sort by alterable value with the layer object. If that still has issues, then keep some specific "ObjA Overlaps ObjB" -> Move ObjA in front of ObjB events. I have yet to find a super simple way to keep large groups of objects from accidentally sorting in odd ways 100% of the time without being more heavy handed and separating them to their own layers (ie characters, ui and backgrounds on their own layers)

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hum thanks. The overlap method could work but I think it would be very CPU intensive. As for the alterable value layer method that could also work but I fear I have used alterable z values. Order.jpg Whats wrong with this method? Is it because I need to run a loop for each group of objects? Thanks so much.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh no not to do with loops with each group. Heres a simpler example: https://www.mediafire.com/file/15zn6...Order.mfa/file When you press space the first time it works but then pressing it again causes an error.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    282
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Is there any reason you're not just setting the order in Fusion?

    See line 3.
    Attached files Attached files

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea i have tried that, i explained above why i cant really use that method

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    282
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    If you're using qualifiers then if it doesn't exist Fusion will just ignore the command and carry on.

    Changing the order at the create event of any object and using it with "always set the order" has worked correctly for me.

    If what you're doing is more complex than I'm imagining, it might not be the order that's the issue, but how and when you're creating the objects - then you could look at changing the order of your creation events instead.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok thanks, i have a huge always event which sends objects/qualifiers first to the front then behind certain objects. This works much better than previous attempts, but still has some errors. I just need to add order events after creation for immediate effect. For some reason two objects alternate order. For example object a will have the correct order in reference to object b and then another object a will have the wrong order in reference to object b.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,226
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)
    I believe when you simply tell a qualifier group to move above/below another object or qualifier, it just singles out one (possibly the last one created?) and leaves the rest where they are. This can be resolved with a foreach loop or careful management of sorting when you create an object. It is hard to understand your intentions with that simplified example. The last thing you want to do is sort every frame as it will cause a lot of unnecessary cpu use.

    As for overlapping conditions, they are not that expensive if you are careful in how you use them.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Lukiester's Avatar
    Join Date
    Feb 2014
    Location
    Melbourne
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep beautiful, running a loop for each qualifier worked a treat. Thanks so much

Similar Threads

  1. Replies: 2
    Last Post: 8th October 2015, 12:30 PM
  2. A way to see display order within a layer?
    By Eagi in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st October 2012, 01:12 PM
  3. Changing layer/ order of Direct Show object
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th January 2011, 07:10 PM
  4. Picking Objects with Layer Object
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 6th February 2009, 09:56 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
  •