overlap of 2 objects with the same qualifier

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • 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

    Please login to see this link.

  • 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?

    Please login to see this link.

  • 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.

    //Jonas
    Please login to see this link.

  • 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)

  • 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. :D

    Please login to see this link.

  • 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

  • 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: Please login to see this link.

    Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!