Detect a row of objects (Solved)

Sorry, misunderstanding, I was thinking vertical :slight_smile:

its ok any ideas on how to make it work horizontal (i used the proximity and spawned objects to check but that brought the game down to like 10 fps)

On the phone, can’t check what is going on. Maybe as JR suggested? Create a block 10 wide, 1 high, place it to the row, non solid but collision enabled.
Collision check set to left/right only and then count the output?
No idea if that works, just throwing it out here

Tried to open your game on phone but the logic is just too far spread for me to see :slight_smile:
( … whispers … bundles … )

1 Like

colliders only output 1 if hit : /

bundels confuse me btw idek why but code inside code inside code fries my brain

@JR01 how can I make table lookups? I have never even attempted this

You have to use a single list
Or a list for each row

Another idea is to check the height of the block.

1 Like

have an object check for proximity (square, 15 pixels) when it moves 32 pixels (if it’s going right, -32 if going left), and then every time it hits, add one to a counter. clear the counter when it starts moving again.

1 Like

I already did this but it took about 5 sec to check the board (to clear 1 row) and slowed the game down a ton (like 10 fps)

since they are spawned in I can’t have another object detect their pos and having all of the objects send their x and y cords would jumble it up

You don’t have another object detect their position, you have the blocks to check their own position and place themselves in the list. Using Math to see what Cell they’re in, they would be able to tell where in the List they are at.

1 Like

I went to try to do this but I don’t understand lists enough to do it luckily I found an alternative and it works without too much lag.