System for detecting if there is only one of an object?

I have this system which checks if there is a tile in any of the cardinal directions, the goal is to only go through if there is ONE. But the issue is that when there are 3, the second XOR block only gets triggered once, so then it activates.

Im sure there is a simple solution.

Edit (Logic Gates with multiple inputs would be awesome)


I would just increase a number by 1 for each object hit.
If it hits one, = 1
If it hits 3, = 3

1 Like