Difference between revisions of "VisionaireObject Command: getPoints"
From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "Returns a table containing multiple point values (x, y coordinate tables). == Syntax == <syntaxhighlight lang="lua"> getPoints(field) </syntaxhighlight> == Parameters ==...") |
(No difference)
|
Revision as of 16:55, 31 August 2023
Returns a table containing multiple point values (x, y coordinate tables).
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