This would work (I think) assuming that the surrounding objects are of the same type (object):
Let's assume your objects are in a grid tile formation, with each object being the same dimensions as a tile.
That means that any one object has neighbours in its 8 surrounding squares, including diagonals.
We pick instance A, using whatever pick method you want (e.g. touch, a step function, etc)
Set its x and y coordinates to a pair of local static variables, l_x and l_y,
Set its width and height to a pair of local static variables, l_w and l_h
We can now check each for each object in each direction around object A by using a pair of nested "for" loops.
Add these conditions in the next event below the pick event (not as a sub event):
System|For: "x" from -1 to 1
System|For: "y" from -1 to 1
System |Compare two values: If loopindex("x") does not equal 0
System |Compare two values: If loopindex("y") does not equal 0
System |Pick instance of objectX at (l_x+loopindex("x")*l_w,l_y+loopindex("y")*l_h)
Make sure they are all in the same event.
The first condition is going to check the tiles to the left and right;
The second condition is going to check tiles above and below;
The next two conditions exclude the tile you initially selected, where instance A is situated;
The last condition picks the object instance that is a set coordinate distance from instance A by taking its current (x,y) position and either adding or subtracting its height or width .
You can then grab whatever instance variable you want from the selected instance in the action e.g.:
Set global variable checkThis to instance.myCheckThis.
It gets trickier if you have different object types to check, but the same basic principle applies.
Hope that makes sense!