GetElementRadius: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Client function}} | {{Client function}} | ||
{{Needs Checking|Is this function still incomplete? --[[User:Winky-|Winky-]] 16:34, 23 December 2011 (CET)}} | |||
__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 element. | 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. |
Revision as of 15:34, 23 December 2011
This article needs checking. | |
Reason(s): Is this function still incomplete? --Winky- 16:34, 23 December 2011 (CET) |
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
- getElementBoneMatrix
- getElementBonePosition
- getElementBoneRotation
- getElementBoundingBox
- getElementDistanceFromCentreOfMassToBaseOfModel
- getElementLighting
- getElementRadius
- isElementCollidableWith
- isElementLocal
- isElementOnScreen
- isElementStreamable
- isElementStreamedIn
- isElementSyncer
- isElementWaitingForGroundToLoad
- setElementBoneMatrix
- setElementBonePosition
- setElementBoneRotation
- setElementCollidableWith
- setElementStreamable
- updateElementRpHAnim
- Shared
- 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