Element/Object: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 6: Line 6:
==XML syntax==
==XML syntax==
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<object model="" posX="" posY="" posZ="" rotX="" rotY="" rotZ=""/>
<object model="" posX="" posY="" posZ="" rotX="" rotY="" rotZ="" interior="" dimension="" />
</syntaxhighlight>
</syntaxhighlight>


Line 19: Line 19:
* '''rotY''': A float representing the Y rotation of the object in degrees.
* '''rotY''': A float representing the Y rotation of the object in degrees.
* '''rotZ''': A float representing the Z rotation of the object in degrees.
* '''rotZ''': A float representing the Z rotation of the object in degrees.
* '''interior''': The interior world the object is in.
* '''dimension''': The object's dimension number.


==Related scripting functions==
==Related scripting functions==

Revision as of 14:51, 7 March 2009

The object class represents static, 3-D models in the GTA world. Objects can only represent models created by the server, they cannot represent models that are part of the GTA's default landscape. Examples of objects include building models, roads, and terrain.

The element type of this class is "object".

XML syntax

<object model="" posX="" posY="" posZ="" rotX="" rotY="" rotZ="" interior="" dimension="" />

Required Attributes

  • model: The ID of the object being created. Since GTA has thousands of objects, these are hard to document on the wiki. Instead, they can be found using the object browser in the map editor.
  • posX: A float representing the X position of the object.
  • posY: A float representing the Y position of the object.
  • posZ: A float representing the Z position of the object.

Optional Attributes

  • rotX: A float representing the X rotation of the object in degrees.
  • rotY: A float representing the Y rotation of the object in degrees.
  • rotZ: A float representing the Z rotation of the object in degrees.
  • interior: The interior world the object is in.
  • dimension: The object's dimension number.

Related scripting functions