User Tag List

Results 1 to 8 of 8

Thread: X and Y values of multiple actives of the same typ

  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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    X and Y values of multiple actives of the same typ

    I have a problem. I have multiple doubles of my enemys in the game beacuse i cant for obvious reasons have on specific active for every single one of the enemys that is of the same type. The problem is that i want the enemy to be able to go in front and back of sertain objects compared to his Y value.

    The problem is that it seems to compare the Y value of all the enemys of the same typ or one of them and not individually because it does not really work. How can i do so when it checks if an enemy is at the correct Y value it only checks that particular enemy and not all of them?

  2. #2
    Clicker iOS Export Module

    Join Date
    Feb 2010
    Location
    Behind the tree!
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: X and Y values of multiple actives of the same typ

    Use the Layer object.

    It has a 'sort by y position', as well as lots of useful ordering and layer related functions.

    Also to differentiate between instances of the same object you need to use fastloops or the foreach object.

  3. #3
    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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: X and Y values of multiple actives of the same typ

    Quote Originally Posted by Bigfoot
    Use the Layer object.

    It has a 'sort by y position', as well as lots of useful ordering and layer related functions.

    Also to differentiate between instances of the same object you need to use fastloops or the foreach object.
    Is there any more info or tutorial on how to use this object?

  4. #4
    Clicker iOS Export Module

    Join Date
    Feb 2010
    Location
    Behind the tree!
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: X and Y values of multiple actives of the same typ

    Look in the examples folder of your mmf directory for the object you want, as well as the help button in the properties panel about tab.

    Also try the search button on the forum?

  5. #5
    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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: X and Y values of multiple actives of the same typ

    Quote Originally Posted by Bigfoot
    Look in the examples folder of your mmf directory for the object you want, as well as the help button in the properties panel about tab.

    Also try the search button on the forum?
    I cant find any example of Layers object? And the help file is not really that helpful..

  6. #6
    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,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: X and Y values of multiple actives of the same typ

    You could try making a condition like:

    +Always
    - (layer object)Sort by Descending Y



    Mobichan

  7. #7
    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,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: X and Y values of multiple actives of the same typ

    Quote Originally Posted by mobichan
    You could try making a condition like:

    +Always
    - (layer object)Sort by Descending Y



    Mobichan
    Did not work

  8. #8
    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,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: X and Y values of multiple actives of the same typ

    What is it NOT doing when you try that approach? Basically, that action will sort everything (on the same layer) by their y position. When things have the same y position, you might get glitches. In those cases, you need to have other lines of code that force objects in front of or behind each other. This is how sorting works (in game making in general). It can be a pain, but you need to write code to deal with it. There isn't some magical way to make stuff sort automatically, in case you were wondering.

Similar Threads

  1. Possible to export actives and values to excel? Extension?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 10th July 2012, 12:00 PM
  2. Array Lookup Table for extended Alterable Values for Actives
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 1st April 2012, 04:06 PM
  3. Creating multiple detectors for copies of actives
    By Brooks2000 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 15th February 2012, 07:13 PM
  4. Help with creating multiple actives
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th August 2008, 11:18 AM
  5. Sum (multiple alt values, multiple objects)
    By Melvin in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th April 2007, 02:00 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
  •