You probably could try
IF Object.X == Wall.X+(how far away you would want it to detect)
edit - or of course you could try it with Y or both , XY
edit -
i also forgot to mention:
if the Wall is in the center and the Object is on the right you would use(+)
IF Object.X == Wall.X+(how far away you would want it to detect)
and if the Object is on the left you would use (-):
IF Object.X == Wall.X-(how far away you would want it to detect)
and if the wall is in the center and the Object is above you would use(+):
IF Object.Y == Wall.Y+(how far away you would want it to detect)
and if the Object is beneath the wall you would use (-):
IF Object.Y == Wall.Y-(how far away you would want it to detect)
i hope this is what you want to find out about
Radkampfwagen