GetElementRadius: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Client function}} | {{Client function}} | ||
__NOTOC__ | __NOTOC__ | ||
This function gets the radius from a element. Depending on the shape of the element this may be an accurate or very inaccurate way to detect if the player is near or within the | This function gets the radius from a element. Depending on the shape of the element this may be an accurate or very inaccurate way to detect if the player is near or within the element. | ||
<!-- This could really do with saying what elements it affects, and what you'd expect to get back from them --> | <!-- This could really do with saying what elements it affects, and what you'd expect to get back from them --> |
Revision as of 14:01, 4 August 2011
This function gets the radius from a element. Depending on the shape of the element this may be an accurate or very inaccurate way to detect if the player is near or within the element.
Syntax
float getElementRadius ( element theElement )
Required Arguments
- theElement: The element.
Returns
Returns float as radius, false otherwise.
Example
This example shows how to get the radius of a player
function myCommandHandler(command) local myradius = getElementRadius ( getLocalPlayer() ) if (myradius) then outputChatBox("Radius of my player is: " .. myradius) else outputChatBox("Error") end end addCommandHandler("getmyradius", myCommandHandler)
See Also
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAngularVelocity
- getElementAttachedOffsets
- getElementAttachedTo
- getElementBoneMatrix
- getElementBonePosition
- getElementBoneRotation
- getElementBoundingBox
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getElementDimension
- getElementDistanceFromCentreOfMassToBaseOfModel
- getElementHealth
- getElementID
- getElementInterior
- getElementLighting
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRadius
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementCollidableWith
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLocal
- isElementLowLOD
- isElementOnScreen
- isElementStreamable
- isElementStreamedIn
- isElementSyncer
- isElementWaitingForGroundToLoad
- isElementWithinColShape
- setElementAlpha
- setElementAngularVelocity
- setElementAttachedOffsets
- setElementBoneMatrix
- setElementBonePosition
- setElementBoneRotation
- setElementCallPropagationEnabled
- setElementCollidableWith
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementMatrix
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementStreamable
- setElementVelocity
- setLowLODElement
- updateElementRpHAnim