IsElementStreamable: Difference between revisions
Jump to navigation
Jump to search
(Added OOP syntax introduced in r6987 and removed the "example" (it didn't make sense)) |
-ffs-PLASMA (talk | contribs) No edit summary |
||
Line 15: | Line 15: | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the passed element is streamable like normal, ''false'' if this element must always be streamed in. | Returns ''true'' if the passed element is streamable like normal, ''false'' if this element must always be streamed in. | ||
==Example== | |||
<section name="Client" class="client" show="true"> | |||
Check if | |||
<syntaxhighlight lang="lua"> | |||
function onClientColShapeHit(theElement, matchingDimension) | |||
if(IsElementStreamable(theElement)) then -- Checks whether the element is streamable | |||
outputChatBox( "Element is streamable") | |||
else | |||
outputChatBox( "Element not streamable") | |||
end | |||
end | |||
addEventHandler("onClientColShapeHit", root, onClientColShapeHit) | |||
</syntaxhighlight> | |||
</section> | |||
==See Also== | ==See Also== | ||
{{Client element functions}} | {{Client element functions}} |
Revision as of 20:48, 14 February 2020
Script Example Missing Function IsElementStreamable needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
This function checks whether an element is streamable as set by setElementStreamable or not.
Syntax
bool isElementStreamable ( element theElement )
OOP Syntax Help! I don't understand this!
- Method: element:isStreamable(...)
- Variable: .streamable
- Counterpart: setElementStreamable
Required Arguments
- theElement: The element to check the streamability of.
Returns
Returns true if the passed element is streamable like normal, false if this element must always be streamed in.
Example
Click to collapse [-]
ClientCheck if
function onClientColShapeHit(theElement, matchingDimension) if(IsElementStreamable(theElement)) then -- Checks whether the element is streamable outputChatBox( "Element is streamable") else outputChatBox( "Element not streamable") end end addEventHandler("onClientColShapeHit", root, onClientColShapeHit)
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