- Documentation
- Server events
- onColShapeHit
Event
onColShapeHit
An element entered a collision shape.
Handler
addEventHandler("onColShapeHit", root, function(hitElement, matchingDimension) ... end)Parameters
hitElementelement- The element.
matchingDimensionbool- Whether it is in the same dimension.
Source
source is the shape.
Example
local zone = createColCircle(2495, -1687, 25)
addEventHandler("onColShapeHit", zone, function(el, dim)
if dim and getElementType(el) == "player" then outputChatBox("Witaj na Grove Street", el) end
end)
See also
onColShapeLeaveAn element left a collision shape.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.