How do I do a check for FULLY overlapping?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Of course there's the x overlapping y event, but that is not exactly what I need, lets say with this image here, i want it to only return as 0 when the orange square is FULLY overlapping the active, and if even a pixel is off of it, it returns as 1. I cannot use the coordinates of the sprites corners as in the proper (non sample image) file the [orange] sprite is not square. If there's a way to do it using the sprites default hitbox/image or even an addon that has the functionality somewhere that would be preferred.

    Please login to see this attachment.

  • The 'simplest' way I can think of doing it is by creating a second (invisible) object that is the same as the first larger object, but with the sprite being 'inverted' so all the empty space is filled, and the filled space of the original sprite is empty in the new sprite. Then check to see if it is overlapping one object but not the other

  • yeah I probably should have been more specific initially about how the proper file works, the object I want to check if something is fully overlaying it are tiles you can place/delete, and I am doing a check if a placeable object that goes ON the tiles is fully overlapping them. So it has to be pretty versatile and can't be an inverted version of the sprite. I could probably do a system where every space there isn't a tile it places an invisible hitbox but obv I want that to be a last resort for performance and optimization reasons.

    Please login to see this attachment.

  • Do the objects have height? If so, you wouldn't want it to require 100% overlap. It might be helpful to have an example of an object and an acceptable/unacceptable placement.

    .:::.Joshtek.:::.

    Visit Please login to see this link. to publish your freeware Click games and play games made by others or check out Please login to see this link. to enjoy or contribute to our archive of over 3,200 older Click games.

  • After messing around a bit, popcorns method has worked, I got four objects and set them to the top, left, right, and bottom, and did a check for all of them overlapping, thanks :)

    Please login to see this attachment.Please login to see this attachment.

  • # IF you are working with tiles ~ like it seems you are, this should never be an issue.

    the golden rules are:

    DONT place or move tiles etc, with smooth movement and expect someone to be pixel perfect

    DO snap to your grid - this is only going to check if your grid (x,y) is take or not - and/or will snap exactly over the old tile.


    if you are trying to get and area over a tile, you can use a {test} tile/sprite/object; X,Y to X+Owdith, Y+Oheight - and compare if the tile under it is inside this area.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!