Difference between revisions of "VisionaireObject Command: getPaths"
From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "Returns a table containing multiple paths to media files. == Syntax == <syntaxhighlight lang="lua"> getPaths(field) </syntaxhighlight> == Parameters == {| class="ts" |- !...") |
(No difference)
|
Latest revision as of 15:49, 31 August 2023
Returns a table containing multiple paths to media files.
Syntax
getPaths(field)
Parameters
| Parameter | Type | Description |
|---|---|---|
| field | integer | The field which specifies a list of path values. The field type must be "t_vpath".
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_path values linked in the field. The paths will be returned in unix format ("/" for directories) and relative to the .ved file. |
Examples
Example 1: Get the file paths of the textures of a 3D character model.
-- Specify the field constant name or the field id
local txtr_tbl = getObject("Characters[hero].CharacterOutfits[Normal]"):getPaths(VOutfitModelTextures)
local txtr_tbl = getObject("Characters[hero].CharacterOutfits[Normal]"):getPaths(728)
-- The shorthand notation offers a more convenient way to achieve the same
local txtr_tbl = Characters["hero"].Outfits["Normal"].ModelTextures