GetElementID: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
This function gets the ID of an element. | This function gets the ID of an element. | ||
Line 6: | Line 4: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
string getElementID ( element | string getElementID ( element theElement ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''theElement:''' the element from which to retrive the ID. | ||
===Returns=== | ===Returns=== | ||
Returns a string containing the element ID, or false if the element is invalid. | Returns a string containing the element ID, or false if the element is invalid, or has no ID. | ||
==Example== | ==Example== | ||
Line 26: | Line 24: | ||
==See Also== | ==See Also== | ||
{{ | {{Element_functions}} |
Revision as of 04:10, 22 August 2006
This function gets the ID of an element.
Syntax
string getElementID ( element theElement )
Required Arguments
- theElement: the element from which to retrive the ID.
Returns
Returns a string containing the element ID, or false if the element is invalid, or has no ID.
Example
To get the ID of the following element:
<flag id="northflag" posX="2365" posY="215" posZ="32">
You could use the following code:
-- assume flag refers to the flag element in the above XML code idstring = getElementID ( flag ) -- get the id of the flag element outputChatBox ( "The flag's ID is: " .. idstring ) -- output: The flag's ID is: northflag
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