How to overlap 2 instances from the same object

0 favourites
  • 2 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hi there,

    I need to validate when an instance of an object is overlapping another instance from any object, the issue here is that works like a charm when I validate this condition against different objects but when I try to validate 2 instances from the same object stops working.

    Please take in consideration that I'm using "for each object" because I need to validate this for over 40 instances and without it doesn't update the information for each instance.

    Hope you understand what I'm saying... And in advance thanks before!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I fussed about with this for a long time.

    What I ended up doing was creating a second sprite called "HitMask" that was the same height and width of the object I want to check. I then pin it to the object (eg. HitMask is pinned to SpriteA) and set HitMask to invisible. Now any subsequent overlap/collision conditions I need to call like "SpriteA overlapping SpriteA" are now called using "SpriteA overlapping HitMask".

    You will probably need to save the UID of SpriteA to an instance variable in HitMask so that you can reselect it before your overlap condition (otherwise it will just use the first instance of the HitMask sprite).

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