GET TERRAIN HEIGHT This command will return the height of the terrain at the specified coordinate of the terrain.
Syntax
    Return Float=GET TERRAIN HEIGHT(Terrain Number, X, Z)
Parameters
    Terrain Number
Integer The terrain number
    X
Float Specify the X position value.
    Z
Float Specify the Z position value.
Returns
This command will return the height of the terrain at the specified coordinate of the terrain
Description
The coordinates are specified using real numbers and are based relative to the position of the terrain. The position of the terrain does not affect the coordinates specified here.
Example Code
    make terrain 1,"land.bmp"

    position terrain 1, 0, 0, 1025

    load image "grass.bmp",1

    texture terrain 1,1

    set cursor 0,0

    print "TERRAIN DATA"

    print " exist:";terrain exist(TerrainNumber)

    if terrain exist(1)=1

    print " x:";terrain position x(1)

    print " y:";terrain position y(1)

    print " z:";terrain position z(1)

    print " height:";get terrain height(1, 1.0,1.0)

    print " totalheight:";get total terrain height(1)

    endif

    do

    loop

    delete terrain 1
See also
WORLD Commands Menu Index