OnColShapeLeave: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (See Also for server events) |
||
Line 27: | Line 27: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{See also/Server event|Colshape events}} | |||
{{ |
Revision as of 17:36, 12 January 2008
This event is triggered when a player or a vehicle leaves a collision shape.
Parameters
element leaveElement, bool matchingDimension
- leaveElement: The element that who exited the col shape. This can be a player or a vehicle.
- matchingDimension: a boolean referring to whether the collision shape was in the same dimension as the element.
Source
The source of this event is the colshape that the element no longer is in contact with.
Example
This example kills the player whenever they leave a certain collision shape:
jailZone = createColCircle ( 1024, 1024, 15, 50 ) -- create a collision shape -- call 'jailZoneLeave' whenever a player leaves the collision shape: addEventHandler ( "onColShapeLeave", jailZone, "jailZoneLeave" ) function jailZoneLeave ( thePlayer ) killPlayer ( thePlayer ) -- kill the player outputChatBox ( "You are not allowed to leave the jail!", thePlayer ) end
See Also
Colshape events
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled