Invert sprite overlapping at offset

0 favourites
  • 3 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • Trying to get C2 to check what's around a selected tile, by looking for missing tiles. I'm doing it by inverting "[tile] is overlapping [tile] at offset (-32, 0)". It works fine when there's one invert, but when I try to use two (to decide if the tile is a corner piece), it starts getting confusing. Some screenshots:

    The first invert works. Selects the tiles with no other tiles to the left of them (all tiles are 28x28 snapped to a 32x32 grid)

    But the second invert, which also checks to see if there's no tile to the right of them, doesn't change the outcome.

    Here's another one to make sure there are no tiles to the right, above, or below. For some reason it ignores a tile directly above it.

    Doing this for procedural tile placement for multiple tile types (instead of just wall/floor). An Array would probably be a better method, but just wanted to post this incase anyone knows what might be off.

    edit: Should mention non-inverted seemed to work totally fine. It's only when checking with invert that it does this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know you can check for collisions with the same type, but I always find it confusing.

    The condition is checking for overlap with the currently picked objects, not all of them. So the first condition picks all the left hand tiles. Then the next condition picks all the right hand tiles from the ones already picked, so the left tiles have no picked tiles to it's right so your result is expected.

    A solution is probably to make that event an or block and move the for each to a sub-event.

  • As R0J0hound allready said, check for collisions with the same type is for him confusing, for me it is just straight hell.

    So far, i manage by converging to a solution where i at one point just pick from scratch.

    I suppose that this is what you want to do. ... .capx?dl=0

    But, mainly, you caught my attention since you mentioned 'procedural tile placement'.

    I made an example once about that.

    Something like this ? ... 3luQjNrVzg

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