OnMarkerLeave: Difference between revisions
Jump to navigation
Jump to search
m (→Parameters) |
m (→Parameters) |
||
Line 8: | Line 8: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*'''leftElement''': | *'''leftElement''': the [[element]] that left the [[marker|marker's]] area. | ||
*'''matchingDimension''': | *'''matchingDimension''': a [[boolean]] representing whether the [[element]] is in the same dimension as the [[marker]]. | ||
==Source== | ==Source== |
Revision as of 22:06, 2 April 2018
This event is triggered when an element leaves the area of a marker created using createMarker.
Parameters
element leftElement, bool matchingDimension
- leftElement: the element that left the marker's area.
- 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 the element left.
Example
This example shows a message in the chat box when element (in this case a player) leaves a marker.
local myMarker = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, "cylinder", 2.0, 255, 0, 0, 150 ) function markerLeave( leaveElement, matchingDimension ) if getElementType( leaveElement ) == "player" then outputChatBox ( "Player has left a marker", getRootElement(), 255, 255, 0 ) end end addEventHandler( "onMarkerLeave", myMarker, markerLeave )
See Also
Marker events
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled