How do I check if two object touching the same object

0 favourites
  • 6 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • HI

    I am looking for a way to check if two object touching the same object but necessarily at the same time,

    so if object1 touch an object and then object2 touched the same object something should happen,

    I tried using overlapping offset for object 1 and added another condition for object 2 as below image but nothing happen when any of the objects touch the other object:

  • Try this way:

    Event: Sprite22 Is overlapping Sprite1

    AND (another condition) Sprite22 is overlapping Sprite2

    and then you add your action. This should work, if it doesn't, let me know.

  • thanks ChesVCF I tried it but the same problem nothing happens,

    using your way or my way it only works if I checked if one object is overlapping with another, but when I check if two object are overlapping with another i doesn't work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't understand why this doesn't work for you, for me it works fine.

    Using my way, there are two conditions, and whenever they are true, an action happens. I can only imagine tant you have added some extra conditions, that aren't always true and therefore the action doesn't happen.

    Try this:

    • Toggle disabled (or delete) all extra conditions, that aren't the ones I told you
    • Make sure you are using the event "Is overlapping" and not "Is overlapping at offset"
    • Try using the event "On collision with an object"

    If this doesn't work, please attach a capx and I will take a look.

  • I solve it,

    by creating a variable x, and if the first object touch the x is set to 1

    and if the other object touch the x is set to 2

    and if the x = 2, do the actions.

  • Fine This was going to be my next solution, but I simply don't understand why the first solution didn't work.

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