SetElementDoubleSided: Difference between revisions
Jump to navigation
Jump to search
(Created page with '{{Server client function}} __NOTOC__ This function allows you to set the double-sidedness of an element's model. When an element's model is double-sided, it's back facing triangl…') |
m (→Syntax: OOP) |
||
Line 9: | Line 9: | ||
bool setElementDoubleSided ( element theElement, bool enable ) | bool setElementDoubleSided ( element theElement, bool enable ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP|This function is also a static function underneath the Element class.|[[element]]:setDoubleSided||}} | |||
===Required Arguments=== | ===Required Arguments=== |
Revision as of 16:38, 16 August 2014
This function allows you to set the double-sidedness of an element's model. When an element's model is double-sided, it's back facing triangles become visible.
Possible uses of double-sidedness are: Elimination of invisible walls, using buildings as enclosures, using inverted landmasses as large pits or to make cave networks. It can also remove the need to add extra triangles to custom models when trying to make them appear solid from all directions.
Syntax
bool setElementDoubleSided ( element theElement, bool enable )
OOP Syntax Help! I don't understand this!
- Note: This function is also a static function underneath the Element class.
- Method: element:setDoubleSided(...)
Required Arguments
- theElement: The element in which you'd like to set the double-sidedness of.
- enable : Set to true/false to enable/disable double-sidedness.
Returns
Returns true if theElement is valid, false otherwise.
Example
Click to collapse [-]
ServerThis example shows how to set the double-sidedness of an object in a map file.
<map mod="deathmatch"> <object name="object (1)" posX="100" posY="200" posZ="20" rotX="0" rotY="0" rotZ="0" doublesided="true" model="3860"/> </map>
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