Hi,
in 2D space and in world coordinate I would find the position of the game objects and compare them (using Get position and a Float comparison action)... in 3D space I would do something similare but maybe using a comparison of the 3 axes unless hight doesn't matter.
Hope that could help
Have a nice day