Element/Water: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (Добавление языков)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
In San Andreas, the water in the game world (rivers, lakes, seas) is defined through a large number of water polygons, which can be quadrilateral or triangular. A water element represents one such polygon. You can create water elements with [[createWater]] or through a <water/> map element. For simplicity, water map elements only support rectangular polygons.
__NOTOC__
In San Andreas, the water in the game world (rivers, lakes, seas) is defined through a large number of water polygons, which can be quadrilateral or triangular. A water element represents one such polygon. You can create water elements with [[createWater]] or through a <water/> map element.


==XML syntax==
==XML syntax==
<syntaxhighlight lang="xml"><water posX="" posY="" posZ="" sizeX="" sizeY=""/></syntaxhighlight>
<syntaxhighlight lang="xml"><water posX1="" posY1="" posZ1="" posX2="" posY2="" posZ2="" posX3="" posY3="" posZ3="" [ posX4="" posY4="" posZ4="" ] /></syntaxhighlight>


===Required Attributes===
===Required Attributes===
*'''posX, posY, posZ:''' the world coordinates of the center of the (rectangular) water ''surface''.
*'''posX1, posY1, posZ1:''' the position of the lower left (south-west) corner of the water surface.
*'''posX2, posY2, posZ2:''' the position of the lower right (south-east) corner of the water surface.
*'''posX3, posY3, posZ3:''' the position of the upper left (north-west) corner of the water surface.


===Optional Attributes===
===Optional Attributes===
*'''sideX:''' the size of the water rectangle along the X axis. Defaults to 20.
*'''posX4, posY4, posZ4:''' the position of the upper right (north-east) corner of the water surface.
*'''sideY:''' the size of the water rectangle along the Y axis. Defaults to 20.
 
If only the first three corners are specified, a water triangle is created. If the fourth corner is also specified, a rectangle is created.
 
==Related scripting functions==
===Server===
{{Water functions}}
 
===Client===
{{Client water functions}}
 
[[Category:Element Types]]
 
[[en:Element/Water]]
[[ru:Element/Water]]
[[hu:Element/Water]]

Latest revision as of 18:46, 15 April 2021

In San Andreas, the water in the game world (rivers, lakes, seas) is defined through a large number of water polygons, which can be quadrilateral or triangular. A water element represents one such polygon. You can create water elements with createWater or through a <water/> map element.

XML syntax

<water posX1="" posY1="" posZ1="" posX2="" posY2="" posZ2="" posX3="" posY3="" posZ3="" [ posX4="" posY4="" posZ4="" ] />

Required Attributes

  • posX1, posY1, posZ1: the position of the lower left (south-west) corner of the water surface.
  • posX2, posY2, posZ2: the position of the lower right (south-east) corner of the water surface.
  • posX3, posY3, posZ3: the position of the upper left (north-west) corner of the water surface.

Optional Attributes

  • posX4, posY4, posZ4: the position of the upper right (north-east) corner of the water surface.

If only the first three corners are specified, a water triangle is created. If the fourth corner is also specified, a rectangle is created.

Related scripting functions

Server



Client