VisionaireObject Command: getRects

From The Official Visionaire Studio: Adventure Game Engine Wiki

Returns a table containing multiple rectangle values (tables containing the elements x, y, width, height).


Syntax

getRects(field)


Parameters

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

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_rect values linked in the field


Examples

Example 1: Get the savegame areas of a menu scene.

-- Specify the field constant name or the field id
local save_rects = getObject("Scenes[savemenu]"):getRects(VSceneSavegameAreas)
local save_rects = getObject("Scenes[savemenu]"):getRects(322)

-- The shorthand notation offers a more convenient way to achieve the same
local save_rects = Scenes["savemenu"].SavegameAreas