SetElementDoubleSided

From Multi Theft Auto: Wiki
Revision as of 16:06, 11 June 2010 by Ccw (talk | contribs) (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…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 )

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 [-]
Server

This 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