Dgs3DImageIsAttached: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
<!-- 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 | bool dgs3DImageIsAttached( dgsElement element ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[element]]:isAttached|}} | {{OOP||[[element]]:isAttached|}} | ||
Line 13: | Line 13: | ||
===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 --> | ||
*''' | *'''element:''' The dgs 3d image element to check for attachment. | ||
===Returns=== | ===Returns=== | ||
Line 32: | Line 32: | ||
==See Also== | ==See Also== | ||
{{ | {{DGS 3D Image Functions}} |
Latest revision as of 10:07, 17 January 2023
This functions checks whether or not 3DImage element is attached to another element.
Syntax
bool dgs3DImageIsAttached( dgsElement element )
OOP Syntax Help! I don't understand this!
- Method: element:isAttached(...)
Required Arguments
- element: The dgs 3d image 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:
dgs = exports.dgs function isPlayerTalking(player) local player = player or localPlayer; return dgs:dgs3DImageIsAttached(icons[player]); -- this table inside another client file . end
See Also
- dgsCreate3DImage
- dgs3DImageSetSize
- dgs3DImageGetSize
- dgs3DImageSetImage
- dgs3DImageGetImage
- dgs3DImageAttachToElement
- dgs3DImageIsAttached
- dgs3DImageDetachFromElement
- dgs3DImageSetAttachedOffsets
- dgs3DImageGetAttachedOffsets
- dgs3DImageGetNativeSize
- dgs3DImageSetUVPosition
- dgs3DImageGetUVPosition
- dgs3DImageSetUVSize
- dgs3DImageGetUVSize