VisionaireObject Command: getSprites
From The Official Visionaire Studio: Adventure Game Engine Wiki
Returns a table containing multiple sprite values (tables containing the elements path, position, transparency, transpcolor and pause).
Syntax
getSprites(field)
Parameters
Parameter | Type | Description |
---|---|---|
field | integer | The field which specifies a list of sprite values. The field type must be "t_vsprite".
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_sprite values linked in the field |
Examples
Example 1: Get all sprites of an animation.
-- Specify the field constant name or the field id
local anim_sprts = getObject("Animations[waterfall]"):getSprites(VAnimationSprites)
local anim_sprts = getObject("Animations[waterfall]"):getSprites(235)
-- The shorthand notation offers a more convenient way to achieve the same
local anim_sprts = Animations["waterfall"].Sprites