Dgs3DImageIsAttached: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Server client function}} __NOTOC__ <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> This functions checks whether or not an element is attached to another element. ==Syntax== <!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and preve...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{ | {{Client function}} | ||
__NOTOC__ | __NOTOC__ | ||
<!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | ||
This functions checks whether or not | This functions checks whether or not 3DImage element is attached to another element. | ||
==Syntax== | ==Syntax== | ||
<!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --> | <!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool isElementAttached ( | bool isElementAttached ( dgsElement the3DImageElement ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[element]]:isAttached | {{OOP||[[element]]:isAttached|}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
<!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --> | <!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --> | ||
*''' | *'''the3DImageElement :''' The element to check for attachment. | ||
===Returns=== | ===Returns=== |
Revision as of 22:20, 11 August 2022
This functions checks whether or not 3DImage element is attached to another element.
Syntax
bool isElementAttached ( dgsElement the3DImageElement )
OOP Syntax Help! I don't understand this!
- Method: element:isAttached(...)
Required Arguments
- the3DImageElement : The element to check for attachment.
Returns
Returns true if the specified element is attached to another element, false if it is not attached or nil if an improper argument was passed.
Example
This example is making export function to check weather the player is talking or not:
function isPlayerTalking(player) local player = player or localPlayer; return dgs:dgs3DImageIsAttached(icons[player]); end
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