Scripting/Client/Functions/GetGroundZLevelForPosLoad

v0.4-beta+: like GetGroundZLevelForPos, but when the place is not streamed in (far away, another island) it is loaded first, so the real ground height comes back. A short hitch: use it right before a teleport, not every frame.

Syntax

GetGroundZLevelForPosLoad(x, y, z)

Arguments

Returns

float

Example

function onScriptLoad()
{
	local pos = player.Pos;
	local result = GetGroundZLevelForPosLoad( pos.x, pos.y, pos.z );
	MessagePlayer( "GetGroundZLevelForPosLoad 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