OnMarkerHit
Jump to navigation
Jump to search
This event is triggered when an element enters a marker created using createMarker.
Parameters
element hitElement, bool matchingDimension
- hitElement: the element that hit the marker.
- matchingDimension: a boolean representing whether the element is in the same dimension as the marker.
Source
The source of this event is the marker that got hit by the element.
Example
This example will output a message what type of element has entered a marker.
local playerMarker = createMarker(0, 0, 2, "cylinder", 5, 10, 244, 23, 200, root) function handlePlayerMarker(hitElement) local elementType = getElementType(hitElement) outputChatBox("Element ("..elementType..") has entered marker.") end addEventHandler("onMarkerHit", playerMarker, handlePlayerMarker)
Issues
Issue ID | Description |
---|---|
#6098 | If a marker was attached to another element, onMarkerHit won't be triggered |
See Also
Marker events
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled