IsElementInWater: Difference between revisions
Jump to navigation
Jump to search
(Let there be light?) |
m (Dedicated to Talidan. <3) |
||
Line 16: | Line 16: | ||
==Example== | ==Example== | ||
Creates a command that checks if the player is in water or not. | Creates a command that checks if the player is in water or not. | ||
<section name="Server" class="server" show="true"> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 28: | Line 29: | ||
addCommandHandler("check", waterCheck) | addCommandHandler("check", waterCheck) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{Element functions}} | {{Element functions}} |
Revision as of 17:45, 20 April 2009
This function checks whether an element is submerged in water.
Syntax
Click to collapse [-]
Server and clientbool isElementInWater ( element theElement )
Required Arguments
- theElement: The element to check.
Returns
Returns true if the passed element is in water, false if it isn't, or if the element is invalid.
Example
Creates a command that checks if the player is in water or not.
Click to collapse [-]
Serverfunction waterCheck(player) if isElementInWater(player) then outputChatBox("Wet.", player) else outputChatBox("Dry.", player) end end addCommandHandler("check", waterCheck)
See Also
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementByIndex
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getAllElementData
- hasElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementWithinColShape
- isElementWithinMarker
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementVelocity
- setLowLODElement
- getPedContactElement
- getResourceDynamicElementRoot
- getResourceRootElement