OnPlayerContact
Jump to navigation
Jump to search
This event is triggered when the player hits an element.
Syntax
void onPlayerContact ( element previous, element current )
Parameters
- The source of this event refers to the player who hit an element.
- previous: the element player was standing on before.
- current: the element that was hit.
Example
This example outputs the element you have hit
function onPlayerContact ( prev, current ) if ( current ~= nil ) then outputChatBox ( "You have hit an "..getElementType ( current ) ) end end addEventHandler ( "onPlayerContact", getRootElement(), onPlayerContact )
See Also
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled