Checking Neighboring objects

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi,

    Im working on a random map generator, I have had some nice success. Now Im looking to actually set the sprites animations based on surrounding objects. I have been unable to figure out an easy way to do this. Ive seen people use overlap at offset, and I cant seem to make that work. Basically, I will just need each sprite to check if there is an object on any of the 4 sides of it. Thanks for any help!

    Adam

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Check out this example

    construct.net/en

    You can read up more about it on google by searching for "tilemap bitwise"

  • Check out this example

    https://www.scirra.com/tutorials/746/auto-tile-using-sprites-arrays-and-a-bitwise-method

    You can read up more about it on google by searching for "tilemap bitwise"

    Hi, and thanks. Ive actually look at that already and it wont work for what Im trying to do. I understand how to tilemap, what I cant figure out is how to get construct to have a sprite check its surroundings as every way Ive seen I cant get it to work (overlap at offset, using tilemaps, etc). I have a very crude way of doing it, spawning 4 sensors to register collisions, but Im looking for a way that doesn't involve spawning 100s of objects.

    Thanks for your help!

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