How to select specific object which is overlapping

0 favourites
  • 7 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Let's say that I am creating 2 different bullet objects, each with different random interval.

    I set the event:

    • On object left-btn click and left-btn is down = set Bullet Disabled
    • On left-btn released = set Bullet enabled

    Problem is, when those 2 objects overlap by coincidence, I can't just select the top object, it will always causes both objects to have their Bullet property disabled.

    Question is - how to select specific overlapping object?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the answer to your question lies in choosing the "Pick nth instance" condition.

  • I think the answer to your question lies in choosing the "Pick nth instance" condition.

    I don't get how to use that condition though, can perhaps give me an example?

  • I'm sorry, I'm no expert enough to know how to use it in your case, I just know (I'm pretty sure) it's the one involved.

  • Still unresolved, any expert can help me here?

  • In this case you don't want to use "Pick nth instance" because you don't know the index of the object you want to pick. Instead, you should use the object's "Pick top/bottom" condition. When multiple objects have been picked by an event, this allows you to pick only the top-most/bottom-most object. Here's an example:

    Z order picking

    Hope that helps.

  • In this case you don't want to use "Pick nth instance" because you don't know the index of the object you want to pick. Instead, you should use the object's "Pick top/bottom" condition. When multiple objects have been picked by an event, this allows you to pick only the top-most/bottom-most object. Here's an example:

    https://dl.dropbox.com/u/917406/zOrderPicking.capx

    Hope that helps.

    Wow... Never would expect it was that simple to do... Never realized there was a 'Pick top/bottom-most object' function.

    Now my issue is resolved, thanks!

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