M MY Multiplayer: Wiki
Side
Kind

engineHasCollisionLoadedAt

Client

Tells whether the world around a point is solid yet: its collision, buildings and landscapes loaded.

bool engineHasCollisionLoadedAt(float x, y, z [, int interior = nil])

Parameters

NameTypeDescription
x, y, zfloatThe point in the world.
interiorintThe interior to load. Without it, the interior the local player is in.default nil

Returns

true if everything around the point is loaded and collides.

Example

local position = getElementPosition(localPlayer)
if not engineHasCollisionLoadedAt(position.x, position.y, position.z) then
    setElementFrozen(localPlayer, true)
end

See also