VisionaireObject Command: getPoints

From The Official Visionaire Studio: Adventure Game Engine Wiki

Returns a table containing multiple point values (tables containing the elements x and y).


Syntax

getPoints(field)


Parameters

Parameter Type Description
field integer The field which specifies a list of point values. The field type must be "t_vpoint".

Specify the field constant name (V + object table name in singular + field name) or the field id.


Return values

Type Description
table The table of t_point values linked in the field


Examples

Example 1: Get the points of a scene object area polygon.

-- Specify the field constant name or the field id
local poly_pnts = getObject("Scene[kitchen].SceneObjects[door]"):getPoints(VObjectPolygon)
local poly_pnts = getObject("Scene[kitchen].SceneObjects[door]"):getPoints(341)

-- The shorthand notation offers a more convenient way to achieve the same
local poly_pnts = Scene["kitchen"].Objects["door"].Polygon