Check collision at position

0 favourites
  • 6 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • Was wondering if there is a construct 2 equivalent of a gamemaker's place_meeting(x, y, object) or place_free(x, y) expression or condition? If not, may i suggest collision checking expressions/conditions for future builds. 8)

    Thanks.

  • Just put all the objects you wish to check for in a family, then make some sprite with a small collision polygon, which you place in that position, then check for collision with the family.

  • Just put all the objects you wish to check for in a family, then make some sprite with a small collision polygon, which you place in that position, then check for collision with the family.

    How would i check if no collision happens? The problem is there is no invert for collision with 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 you need to specify what you mean with "check if no collision happens". What is the situation you want to check?

    But one way to go about that would be to instead use the overlap event. So you'd have

    ObjectA is overlapping ObjectB: DoStuff

    and invert that instead.

  • I think you need to specify what you mean with "check if no collision happens". What is the situation you want to check?

    But one way to go about that would be to instead use the overlap event. So you'd have

    ObjectA is overlapping ObjectB: DoStuff

    and invert that instead.

    The thing is that the object does not overlap.

    Here is the situation. I have a block tile that needs to check if there is collision bellow it (movement is based on 32x32 grid) if the space is empty it will drop down with a delay of 0.2 seconds at 32 pixel increments. If the space is not, it will stop moving. That's all i need it to do. Think of it as a tetris block that moves down after there is empty space bellow it.

    Ideally though, for a none programmer like myself the place meeting and place free expressions helps me do this easily. So the absence of this would require a more inefficient manner of doing the same thing in C2.

  • Thing is, objects that collide still counts as overlapping. Overlap and collide is essentially the same, with the difference that overlap is continuous.

    But this is why I asked you what the situation was.

    A simple solution is to, again, use overlap. You have a separate object, let's just call it Detector, and position it in the area where you want to check if objects are. Now, instead of using ObjectA to check for overlaps, we use Detector.

    Detector is overlapping ObjectB: Move ObjectA

    In CC you could check for overlap at offsets and not need another object, but it's not in C2 currently.

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