Scripting/Client/Functions/GetGroundZLevelForPos

Ground height at that x/y (z is a search-start hint). Only known where the map is loaded (around the player): far away or on another island it returns 0.

Syntax

GetGroundZLevelForPos(x, y, z)
GetGroundZLevelForPos(position)

Arguments

Returns

float

Example

function onScriptLoad()
{
	local pos = player.Pos;
	local result = GetGroundZLevelForPos( pos.x, pos.y, pos.z );
	MessagePlayer( "GetGroundZLevelForPos returned: " + result, player );
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Screen, world and camera

Categories: Client functions | Screen, world and camera