AddVertex

Category: Objects / Vertices
Since engine version: 4.6.5.0 CP

Description

Adds a new vertex to an object.

Syntax

int AddVertex (int iX, int iY, object pObj);

Parameters

iX:
X coordinate, relative to the object center.
iY:
Y coordinate, relative to the object center.
pObj:
Object to receive the new vertex.

Remark

Notice: with any vertex updated caused by stretching or rotation of the object (e.g. building or growth) the vertices will be reset to their original defined position unless a special vertex mode is selected.

Example

AddVertex(50,0, GetHiRank(0));
Makes the captain of the first player stick to the ground.
See also: GetVertex, GetVertexNum, RemoveVertex, SetVertex
jwk, April 2002