SetElementParent: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Server function}} | |||
__NOTOC__ | __NOTOC__ | ||
This function is used for setting an element as the parent of another element. | This function is used for setting an element as the parent of another element. | ||
Line 15: | Line 16: | ||
==Example== | ==Example== | ||
<section name="Server" class="server" show="false"> | |||
This example sets the parent of each spawnpoint to a dummy element: | This example sets the parent of each spawnpoint to a dummy element: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 33: | Line 35: | ||
<spawnpoint id="spawnpoint_3" posX="2510.6899414063" posY="2778.3745117188" posZ="10.8203125" rot="270" skin="285"/> | <spawnpoint id="spawnpoint_3" posX="2510.6899414063" posY="2778.3745117188" posZ="10.8203125" rot="270" skin="285"/> | ||
</spawngroup></syntaxhighlight> | </spawngroup></syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{element functions}} | {{element functions}} |
Revision as of 12:36, 12 August 2007
This function is used for setting an element as the parent of another element.
Syntax
bool setElementParent ( element theElement, element parent )
Required Arguments
- theElement: The element that you wish to set the parent of.
- parent: The element you wish to be the parent of theElement.
Returns
Returns true if both elements are valid, false otherwise.
Example
Click to expand [+]
ServerSee 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