How do I...find multiple overlaps

  • Is there an way of checking if a sprite is overlapping a sprite, which is overlapping a different sprite? What I'm trying to do is pick the sprites that contain a specific variable and check if those sprites are overlapping each other and if they are, then check if they also overlapping this one other sprite. Right now I have:

    System->pick all, is overlapping

    Subevent->System->pick all, is overlapping

    but it doesn't work all the time AND it keeps the original overlapped sprites picked and I don't want that.

  • Are these all instances of the same sprite?

    I'm not sure why you are using the second pick all event for it completely overwrites the first picking..

  • LittleStain - I didn't explain things properly. Sorry about that.

    There are 2 different objects involved.

    The first overlap picks the "enemy" sprites that are overlapping a "laser" sprite. Then the second overlap picks the "enemy" sprites that are overlapping other "enemy" sprites that are overlapping the "laser" sprite.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • As you wrote it in your first post:

    enemy compare var

    enemy is overlapping enemy

    enemy is overlapping laser

    And your last post:

    enemy is overlapping laser

    enemy is overlapping enemy

  • R0J0hound - That's exactly what I thought too. It sounds like such a logical and obvious solution, but I haven't been able to get it working. Over the last couple days, I've tried using every combination I can think of in the same manner you've suggested, using nested conditions, non-nested conditions and different combinations of loops. I thought maybe I was missing an easier solution, but if you're suggesting the same thing I've been thinking, then I must be on the right track, so I'll keep plugging away at it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)