Element: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Undo revision 59086 by Lizzalka (talk))
(35 intermediate revisions by 25 users not shown)
Line 1: Line 1:
{{Needs_Checking|Need to make sure all elements are listed --[[User:Erorr404|Erorr404]] 21:44, 8 December 2006 (CST)}}
An '''element''' is a generic class that can represent almost all in-game [[entity|entities]]. The built-in element types are:


An element is a generic class that represents almost all in-game items. These include:
{{Elements}}
* [[Element/Player|Players]]
* [[Element/Vehicle|Vehicles]]
* [[Element/Object|Objects]]
* [[Element/Pickup|Pickups]]
* [[Element/Marker|Markers]]
* [[Element/Collision shape|Collision shapes]]
* [[Element/Blip|Blips]]
* [[Element/Radar area|Radar areas]]
* [[Element/Team|Teams]]
* [[Element/TXD|TXDs]]
* [[Element/DFF|DFFs]]
* [[Element/XML|XMLNodes]]
* [[Element/Client|Clients]]
* [[Element/Spawnpoint|Spawnpoints]]
* [[Element/Textdisplay|Text Display's]]


These are all stored internally in a [[Element tree|"tree" structure]], as such every element has a parent element, be in the ''root'' element, ''map'' or another element. This is purely for declaring the scope of function calls.
Any other element type can be created as an abstract element, not referring to any game [[entity]]. For example, '''resource''' and '''map''' elements are created when resources and maps are loaded to group entities they create as their children.


There are various functions for manipulating the layout of this element tree.
Elements share common functions such as type and list retrieval, a destroy operation to remove both the element and the game entity it is linked to (except for some elements which can't be destroyed, for example client elements), [[element data]] storing and retrieval, and many more common operations.
 
All elements are stored internally in a [[Element tree|tree structure]], and as such every element except the '''root''' element has a parent element, that can be the '''root''' element, a '''resource''', '''map''' or another element. This is purely for declaring the scope of function calls.
 
==Related scripting functions==
===Client===
{{Client element functions}}
===Server===
{{Element functions}}
[[Category:Scripting Concepts]]
 
[[hu:Element]]
[[it:Elemento]]
[[ru:Element]]
[[es:Elemento]]

Revision as of 06:13, 9 September 2018

An element is a generic class that can represent almost all in-game entities. The built-in element types are:

Any other element type can be created as an abstract element, not referring to any game entity. For example, resource and map elements are created when resources and maps are loaded to group entities they create as their children. Elements share common functions such as type and list retrieval, a destroy operation to remove both the element and the game entity it is linked to (except for some elements which can't be destroyed, for example client elements), element data storing and retrieval, and many more common operations. All elements are stored internally in a tree structure, and as such every element except the root element has a parent element, that can be the root element, a resource, map or another element. This is purely for declaring the scope of function calls.

Related scripting functions

Client


Server