User Tag List

Results 1 to 5 of 5

Thread: Impossibe to check overlap of objects of the same kind/qualifier?

  1. #1
    No Products Registered

    Join Date
    Aug 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Impossibe to check overlap of objects of the same kind/qualifier?

    What I'd like to be able to do is to check if 2 objects referenced by their IDs overlap. As I see it is impossible if they are of the same kind, am I right? (for simplicity. In my case they're actually of the same qualifier)
    For different types I'd write something like
    ID(A) = id1
    A overlaps B
    ID(B) = id2
    But similar thing for the same kind obviously won't work:
    ID(A) = id1
    A overlaps A [this line would do nothing, all objects overlap themselves]
    ID(A) = id2

  2. #2
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    643
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    unfortunately, there isn't a way to do it how you're looking to. however, i do know of a good workaround for this situation.

    create a separate mask object, and always spread its ID, create however many you need and stick them to each instance of the object you want to collide. then, when you loop your objects and test for collision, do something like this:

    on loop "ID"
    ID of object = loopindex "ID"
    object is overlapping mask
    mask ID <> object ID (might need to switch these around, my memory is foggy)

    and your collision should work fine.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Using a fastloop is doing it wrong. If you use the ForEach object to loop through the objects, it is faster, and it doesn't require spreading the ID (though you can still do it just in case).

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    643
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    perhaps so happygreenfrog, however, i have not yet found a way to use the foreach object and use it to move objects with loops (i.e on loop x move object 1 pixel) so i stick with fastloops

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,665
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I remember freaking old example from TGF 1.x days with verification of how many Objects of same type collided with each other, but the mask object is the simplest solution.

    Or to simplify it just make one mask object and on A collides A Pick one of A and set its value to spread, or just bounce on collision.

Similar Threads

  1. Why doesn't my overlap check work?
    By rubes in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th August 2013, 04:25 AM
  2. Problems using Qualifier / Groups when overlap
    By AyreGuitar in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 30th January 2012, 03:20 PM
  3. overlap of 2 objects with the same qualifier
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 8th April 2009, 03:28 PM
  4. [Bug] Object overlap check fail
    By Nifflas in forum File Archive
    Replies: 6
    Last Post: 19th January 2009, 04:34 PM
  5. Qualifier Overlap Question
    By HammerBro in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 23rd December 2008, 06:38 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
  •