User Tag List

Results 1 to 9 of 9

Thread: Y order not working correctly

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid 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)

    Join Date
    Oct 2007
    Location
    UK
    Posts
    306
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Y order not working correctly

    prob.jpg

    I'm having problems with Y ordering the red actives in the image above. All the actives - including the bushes and walls - have been added to the same group. The two actives that aren't Y ordering correctly are exact clones of the purple actives - so all the sizes, hotspots, etc are same as their working counterparts.

    To Y order, I'm running a loop the number of frame height times and bringing the actives to the front by their Y positions. I just can't see what is causing the problem.

    Any help appreciated, thx.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Have you tried using the Layer Object? The Layer object has a built-in action which can sort based on X-position, Y-position, and Alterable Value.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid 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)

    Join Date
    Oct 2007
    Location
    UK
    Posts
    306
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I've tried with the layer object but, when my actives overlap, they sometimes flash.

    The loop method I'm using:

    yorder.jpg


    usually works fine(it is with all the other actives). I just don't see what is causing the problem.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    1. Are you sure those objects are on the same layer as the other objects?
    2. Its y-position is exactly the same as the others in its row?

    If you still cannot get it to work using your method there is a way to get rid of the flashing with the layer object.
    Basically you assign an AV (called OrderIndex in this case) to each object. The OrderIndex for each object would be equal to its (Y-position*Ymultiplier)+(X-position*Xmultiplier). This would give each object a unique number that it could be sorted by. For example you said you wanted the ordering to be based on Y-Position. As such, you would make the Ymultiplier much greater than the X-Multiplier; like 1000 (YMultiplier) as compared to 2 (Xmultiplier).

    So let's say you have 3 objects at

    - (32,32)
    - (64,32)
    - (32,64)

    The respective OrderIndex values would be

    - (32*2)+(32*1000) = 3232
    - (64*2)+(32*1000) = 3328
    - (32*2)+(64*1000) = 6432

    Then you could simply use the Layer Object and sort based on OrderIndex (ascending or descending) and you should have what you want; a fully functional sorting based on y-positioning without any flashing. The flashing was being caused because multiple objects were being brought in front of each other.

    This method can be used to give priority for either X or Y position in ascending or descending order.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid 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)

    Join Date
    Oct 2007
    Location
    UK
    Posts
    306
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Yes, all the actives are on the same layer. I've even deleted and re-cloned the actives to make sure the sizes and hotspots are the same. Still no joy. It's really odd.

    Thanks for the above. Will give it a try.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid 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)

    Join Date
    Oct 2007
    Location
    UK
    Posts
    306
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Solved the problem. Turns out it wasn't a problem with the red actives; it was the hotspots on the larger wall/bush actives causing the problem. Strange that it worked fine with the other actives though.

    Your method will be a lot better. I'll try to figure it out in the morning(it's late here), although I usually understand things better by looking at the actual code. If possible, could you direct me to an example file or provide a screen shot so I can see how the code is formatted?

    Anyway, thank for your help.

  7. #7
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Here you go. In this case priority is Down > Left > Right > Up. This means the downmost objects have higher priority over leftmost objects which have higher priority than rightmost objects which have higher priority than upmost objects.

    https://dl.dropboxusercontent.com/u/25332369/Caesar.mfa

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid 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)

    Join Date
    Oct 2007
    Location
    UK
    Posts
    306
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    That's smashing. Thanks ProdigyX.

  9. #9
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hmmm but it still doesn't solve the issue of two objects at exactly the same x,y position. For something like that I think you'd need to set a special variable to one object to tell the layer object to sort it specifically above or below an object at the same x,y position.

    You can add something like 0.1 to an object's sort value to make it only draw over an object at the same position, while not drawing over nearby objects that should appear over that one. So if you have two objects:

    ObjectA = 32,32
    ObjectB = 32,32

    And you want ObjectA to always draw over ObjectB, you'd simply add 0.1 to ObjectA's sort value... so if sorting by Y you'd end up with:

    ObjectA = 32,32.1
    ObjectB = 32,32

    So then when the layer object sorts, it will put ObjectA on top and there won't be any flickering. Then you could still have an ObjectC at 32,33 and it would draw over both the other objects as well.

Similar Threads

  1. pictures in mmf2 are not working correctly!
    By UnicornMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd November 2013, 07:33 PM
  2. [BUG: Beta 4] Resizing in MMF editor not working correctly
    By AndyH in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 6th October 2012, 10:50 PM
  3. Overlapping conditions not working correctly.
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 9th June 2012, 06:28 PM
  4. ExtensionView Not Working Correctly
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th July 2011, 06:17 PM
  5. MooClick other players not working correctly
    By izac in forum File Archive
    Replies: 2
    Last Post: 22nd June 2008, 09:46 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
  •