you can do this in quite a few ways.
You could take a pivot way above the terrain, with collisions set up to test the pivot colliding with the terrain, then move it down until it hits the terrain. At that point, get it's Y value.
You could use camera picking, and point the camera down the Y axis at the X/Z location you want to check the height of, and then get the pickedy() value from it.
You could easily use linepicking. AKA:
LinePick(X, 500, Z, X, -500, Z), and again get the Y with PickedY().
I would personally use the third method, but there are a few options for ya.
You could take a pivot way above the terrain, with collisions set up to test the pivot colliding with the terrain, then move it down until it hits the terrain. At that point, get it's Y value.
You could use camera picking, and point the camera down the Y axis at the X/Z location you want to check the height of, and then get the pickedy() value from it.
You could easily use linepicking. AKA:
LinePick(X, 500, Z, X, -500, Z), and again get the Y with PickedY().
I would personally use the third method, but there are a few options for ya.