Checking Neighboring objects

Get help using Construct 2

Post » Sat Jan 25, 2014 10:57 pm

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!

AdammELTINGsKYsTUDIO2014-01-25 22:58:58
B
36
S
5
Posts: 156
Reputation: 3,310

Post » Sun Jan 26, 2014 3:17 am

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"

B
83
S
40
G
15
Posts: 993
Reputation: 16,909

Post » Sun Jan 26, 2014 3:39 am

[QUOTE=justifun] 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"

[/QUOTE]

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!
B
36
S
5
Posts: 156
Reputation: 3,310


Return to How do I....?

Who is online

Users browsing this forum: Sparkz and 2 guests