SetWaterVertexPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Added oop syntax)
Line 7: Line 7:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">bool setWaterVertexPosition ( water theWater, int vertexIndex, int x, int y, float z )</syntaxhighlight>
<syntaxhighlight lang="lua">bool setWaterVertexPosition ( water theWater, int vertexIndex, int x, int y, float z )</syntaxhighlight>
{{OOP||[[water]]:setVertexPosition|vertexPosition|getWaterVertexPosition}}


===Required Arguments===
===Required Arguments===

Revision as of 17:48, 6 August 2016

Accessories-text-editor.png Script Example Missing Function SetWaterVertexPosition needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.


Sets the world position of a corner point of a water area.

[[{{{image}}}|link=|]] Note: X and Y positions will be changed to an even integer. i.e. -2, 0, 2, 4 etc.

Syntax

bool setWaterVertexPosition ( water theWater, int vertexIndex, int x, int y, float z )


OOP Syntax Help! I don't understand this!

Method: water:setVertexPosition(...)
Variable: .vertexPosition
Counterpart: getWaterVertexPosition


Required Arguments

  • theWater: the water element of which to change a vertex.
  • vertexIndex: the index of the vertex to move. Values range from 1 to 4 for water quads, and 1 to 3 for triangles.
  • x: the X coordinate to set for the vertex.
  • y: the Y coordinate to set for the vertex.
  • z: the Z coordinate to set for the vertex.

Returns

Returns true if successful, false otherwise.

Example

--TODO

See Also