How to better measure distance from tiled sprites

In my game the ground is a tiled sprite, and I would like to be able to activate an action when something is within a certain distance of it. The problem is that distance seems to be measured from the upper-left corner of the tiled sprite. How would I measure distance from the surface of the tiled sprite as opposed to the origin point?

All distances are from the origin position of objects, which is the upper left. You need to do math from there for any distances.

Ah ok. So you would compare the Y values of the objects to find the distance from the surface then?

That’d be your best bet, you could also use the ObjectName.Width() expression if you want to get the full width of the tiled sprite, so if you wanted the center X position you could do ObjectNameHere.X() + (ObjecNameHere.Width()/2)