- Documentation
- Shared functions
- createColCircle
Function
createColCircle
Creates a circle-shaped collision zone on the map - with no height limit (it covers everything above and below the circle).
Syntax
colshape createColCircle(float fX, float fY, float radius)Arguments
fXfloat- Centre X.
fYfloat- Centre Y.
radiusfloat- Radius in metres.
Returns
The new zone.
Example
local area = createColCircle(2495, -1665, 50)
addEventHandler("onColShapeLeave", area, function(element)
if getElementType(element) == "player" then outputChatBox("Opusciles teren", element) end
end)
See also
createColSphereCreates a sphere-shaped collision zone. The zone is invisible; when a player enters or leaves it,onColShapeHit/onColShapeLeavefire (server) oronClientColShapeHit/onClientColShapeLeave(client). A zone can be attached to an element (attachElements) so it moves with it.createColTubeCreates a cylinder-shaped collision zone: a circle of radiusradiusfrom heightzup byheightmetres.