Element: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Removed "client", added "console" and "admin"...)
mNo edit summary
Line 17: Line 17:
Any other element type can be created as an abstract element, not referring to in-game entities. For example, ''resource'' and ''map'' elements are created to group entities they create as their children.
Any other element type can be created as an abstract element, not referring to in-game entities. For example, ''resource'' and ''map'' elements are created 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 client elements, which can't be destroyed)...
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 client elements, which can't be destroyed), and many more common operations.


All elements are stored internally in a [[Element tree|"tree" structure]], and as such every element has a parent element, be it the ''root'' element, a ''map'' or another element. This is purely for declaring the scope of function calls.
All elements are stored internally in a [[Element tree|"tree" structure]], and as such every element has a parent element, be it the ''root'' element, a ''map'' or another element. This is purely for declaring the scope of function calls.

Revision as of 12:13, 23 August 2007

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

Any other element type can be created as an abstract element, not referring to in-game entities. For example, resource and map elements are created 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 client elements, which can't be destroyed), and many more common operations.

All elements are stored internally in a "tree" structure, and as such every element has a parent element, be it the root element, a map or another element. This is purely for declaring the scope of function calls.

Related scripting functions

Client


Server