OnClientColShapeHit: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Black Dragon (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
This event | This event triggers whenever an element enters a collision shape. | ||
==Syntax== | ==Syntax== | ||
Line 10: | Line 10: | ||
==Example== | ==Example== | ||
This example | This example outputs "In." to the chatbox whenever a local user enters a collision shape. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function onClientColShapeHit( theEntity, matchingDimension ) | |||
if ( theEntity == getLocalPlayer() ) then --Checks whether the entering entity is the local player | |||
-- | outputChatBox( "In." ) --Outputs. | ||
end | |||
end | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 07:25, 14 June 2007
This event triggers whenever an element enters a collision shape.
Syntax
void onClientColShapeHit ( entity theEntity, bool matchingDimension )
Example
This example outputs "In." to the chatbox whenever a local user enters a collision shape.
function onClientColShapeHit( theEntity, matchingDimension ) if ( theEntity == getLocalPlayer() ) then --Checks whether the entering entity is the local player outputChatBox( "In." ) --Outputs. end end