Difference between revisions of "VisionaireObject Command: getLink"

From The Official Visionaire Studio: Adventure Game Engine Wiki
m (Text replacement - "{{toc}}" to "")
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
+
{| class="toccolours mw-collapsible mw-collapsed ts"
<span class="bold">Command History</span>
+
|-
<div class="mw-collapsible-content">
+
! Function History
<div class="alt-bg">Available since v3.0</div>
+
|-
</div></div>
+
| Available since v3.0
 +
|}
  
  
Allows you to access, read & manipulate the data tables for general game objects, items, characters, conditions, & values etc...
+
Allows you to access, read & manipulate the data tables for objects, items, characters, conditions, & values etc...
  
'''''* this page is a work in progress *'''''
 
  
 
Syntax:
 
Syntax:
Line 25: Line 25:
 
<syntaxhighlight>
 
<syntaxhighlight>
 
game:getLink(VGameCurrentCharacter):getLink(VCharacterCurrentOutfit) -- access table of current characters active outfit
 
game:getLink(VGameCurrentCharacter):getLink(VCharacterCurrentOutfit) -- access table of current characters active outfit
 +
getObject("Characters[Tom]"):getLink(VCharacterCurrentOutfit) -- access active outfit table of character "Tom"
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 43: Line 44:
 
'''object''' <br/>
 
'''object''' <br/>
 
Returns the data from the linked objects table; or returns empty.
 
Returns the data from the linked objects table; or returns empty.
 
{{i18n|GetLink_(CMS)}}
 

Revision as of 00:51, 4 November 2014

Function History
Available since v3.0


Allows you to access, read & manipulate the data tables for objects, items, characters, conditions, & values etc...


Syntax:

getLink(t_link)


Example 1: using getLink as initial function.

game:getLink(VGameCurrentCharacter) -- access all tables of current character
game:getLink(VGameCurrentScene) -- access all tables of current scene

Example 2: using getLink after other functions

game:getLink(VGameCurrentCharacter):getLink(VCharacterCurrentOutfit) -- access table of current characters active outfit
getObject("Characters[Tom]"):getLink(VCharacterCurrentOutfit) -- access active outfit table of character "Tom"


Arguments

t_link: text
The name of the data structure object table.


Flags

none


Return

object
Returns the data from the linked objects table; or returns empty.