GetSurfaceZ
Returns the average surface Z (height) of land tiles at the specified map position. This value is used internally for pathfinding calculations and can be useful for determining the walkable surface level at a given point.
X — X coordinate on the map.
Y — Y coordinate on the map.
WorldNum — map (facet) number (0 = Felucca, 1 = Trammel, etc.).
Returns 0 if the character is disconnected or map data is unavailable.
Возвращает среднюю высоту поверхности (Z) ландшафтных тайлов в указанной точке карты. Это значение используется при расчёте пути и позволяет определить уровень проходимой поверхности в заданной точке.
X — координата X на карте.
Y — координата Y на карте.
WorldNum — номер карты (фасета): 0 = Felucca, 1 = Trammel и т.д.
Возвращает 0, если персонаж не подключён или данные карты недоступны.
function GetSurfaceZ(X: Word; Y: Word; WorldNum: Byte): ShortInt;
def GetSurfaceZ(X: int, Y: int, WorldNum: int) -> int: ...
var
Z: ShortInt;
begin
Z := GetSurfaceZ(GetX(Self), GetY(Self), WorldNum);
AddToSystemJournal('Average surface Z at current position: ' + IntToStr(Z));
end.
z = GetSurfaceZ(GetX(Self()), GetY(Self()), WorldNum())
AddToSystemJournal(f'Average surface Z at current position: {z}')