How do I check if object is next to another object

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • One way to solve this is by using invisible sprites which overlap, but I'd like a bit more cleaner approach, without using object families and such. Array is also an option, but that would be quite a mess in my situation.

    Basically I want a sprite to check if it has a specific object to the right, left, etc. For example platform behaviour can check if its by wall or not, I want to do this to a specific object/sprite.

  • Check if distance between objects is below a threshold and then see if the x is > or < than current object?

  • You can do what Somebody said, or use line of sight too.

  • OK, I admit at this point I am confused.

    I have 2 instances of object A, and like 50 instances of object B.

    If object A has variable set "active", I want it to check if its next to object B.

    I did it your way now, like this:

    Object B is checked (applies to all object B-s) if any object A is at given distance(s), if it is then apply animation to object B and change variable on object A.

    Nothing happens.

    In that, object A is only concluded in expression, does the order chain still apply in that case?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How about On collision at offset?

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