User Tag List

Results 1 to 9 of 9

Thread: overlap of 2 objects with the same qualifier

  1. #1
    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,281
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    overlap of 2 objects with the same qualifier

    Is there a way to detect an overlapping collision between 2 objects in the same qualifier group? I am trying to allow for an enemy being thrown into another enemy. My code looks like this:

    On Loop "ThrownEnemy"
    +(Qualifier Enemy)Alt String A = "THROWN"
    + (Qualifier Enemy) is overlapping (Qualifier Enemy)
    - Change (Qualifier Enemy)Alt String A to ""
    - Subtract 1 from (Qualifier Enemy) Alt B
    - Stop Loop "EnemyThrown"

    Ideally, I want to be able to perform actions on both the enemy that was flying through the air and the enemy that he hit. Can anyone help?

    Mobichan


  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: overlap of 2 objects with the same qualifier

    Would the Select Object help with this?

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

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

    Re: overlap of 2 objects with the same qualifier

    i'm trying to not use extra extensions if possible. Does anyone know if it's possible?

  4. #4
    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,281
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Re: overlap of 2 objects with the same qualifier

    So, the weird thing I am running into is that no matter what action I try to do based on these 2 qualifier objects overlapping, nothing seems to work. It is as though the objects never overlap. And since I am doing this in a fastloop that moves the object pixel by pixel, I would assume the condition would come up true. Maybe qualifiers can't be used this way?

  5. #5
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: overlap of 2 objects with the same qualifier

    From the looks of it that would only work if both enemies were thrown into each other. The first condition will select the enemies that are being thrown, and the second will only test these objects. Unfortunately, I don't know any solution to this problem.

  6. #6
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: overlap of 2 objects with the same qualifier

    this sounds fun:

    Always
    --> Enemy Group - Set AV Z: -1

    "Enemy Group" collides with "Enemy Group"
    --> Spread Value in AV Z of "Enemy Group": 0

    "Enemy Group" collides with "Enemy Group"
    --> Start Loop: "coll_foreach"; 2

    On loop "coll_foreach"
    + AV Z of "Enemy Group" = loopindex("coll_foreach")
    + AS A of "Enemy Group" = "THROWN"
    --> Enemy Group - Set AS A: ""

    On loop "coll_foreach"
    + AV Z of "Enemy Group" = loopindex("coll_foreach")
    + AS A of "Enemy Group" <> "THROWN"
    --> Enemy Group - Subtract from AV B: 1

    i have no idea if that will work; i really don't even want to think about the efficiency of it, but it's really ugly even to look at... it's also hard figuring out which object needs to have its string reset and which one needs its AV B deducted, or if BOTH need them (guessing i'm correct)

    mmf plz to be needing better ways to interface with object instance (and a proper foreach loop)

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

    Re: overlap of 2 objects with the same qualifier

    Whoa... that makes my head spin. :P I actually can't seem to get any actions to work based on a "Qualifier overlaps qualifier". I also don't think I can get away with "collides with" conditions, since they are not that reliable (or at least I am always reading that we should be using overlapping conditions). Maybe a better question for everyone is how to create a simple system for throwing enemies into each other without having to code every case of enemy type versus enemy type. I thought doing this with a qualifier was a good approach until I realized the MMF selection method was too complex for me to figure out. I should also mention that multiple enemies can be flying into different enemies, so I also need to figure out a way to handle all these instances in multiple simultaneous hit scenarious. T_T

    Has anyone ever gotten something like this to work?

    BTW, thanks for the suggestions so far.

  8. #8
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: overlap of 2 objects with the same qualifier

    i used "collide" because it's triggered, so it makes mmf go through the whole id-assignment and testing thing for each pair of colliding objects; "overlap" would probably clump up all colliding objects into a single group, which would give you problems

    qualifier-qualifier checks work for me, so it's possible one or more of your conditions are always returning false for some reason; qualifiers can create some interesting and generally unamusing selection behavior, because of them allowing completely different objects to be treated as instances of some "virtual" object

    there may be other ways of doing this without qualifiers (such as using an alterable string set to something like "enemy" or "item"), but those would likely involve extensions and would probably be slow anyway, and multiple groups inside one string would be really annoying since you'd have to use string parser/tokenizer on them which could slow it down even further

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

    Re: overlap of 2 objects with the same qualifier

    It seems like neither overlapping or collision betweeen 2 objects is yeilding any actions. Can someone take a look at the file? I've uploaded it to the file section here: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Board=5&Number=137162

Similar Threads

  1. Impossibe to check overlap of objects of the same kind/qualifier?
    By GrayFace in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th November 2013, 08:04 AM
  2. creating objects without overlap
    By SolarB in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 12th July 2012, 02:48 PM
  3. 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
  4. Qualifier Overlap Question
    By HammerBro in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 23rd December 2008, 06:38 PM
  5. Two objects overlap. Delete only one.
    By Dines in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th April 2007, 11:29 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
  •