Difference between revisions of "GetObject (CMS)"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 4: | Line 4: | ||
<div class="alt-bg">Available since v3.0</div> | <div class="alt-bg">Available since v3.0</div> | ||
</div></div> | </div></div> | ||
+ | |||
Allows you to access, read & manipulate the data tables for the linked object, item, character, condition, & value etc... | Allows you to access, read & manipulate the data tables for the linked object, item, character, condition, & value etc... | ||
Line 39: | Line 40: | ||
getObject("scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]") -- get animation linked to a scene object | getObject("scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]") -- get animation linked to a scene object | ||
-- * characters * -- | -- * characters * -- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 53: | Line 46: | ||
<span class="bold underline">Arguments</span> | <span class="bold underline">Arguments</span> | ||
− | + | '''Path''': "string" path to required data structure object.<br/> | |
+ | '''Object''': name of the object, character, condition etc; the name is case sensitive. | ||
Line 63: | Line 57: | ||
<span class="bold underline">Return</span> | <span class="bold underline">Return</span> | ||
− | + | none | |
− | + | {{i18n|GetObject_(CMS)}} | |
− | {{i18n| | ||
− | |||
− | |||
− | |||
− |
Revision as of 18:00, 21 February 2014
Command History
Available since v3.0
Allows you to access, read & manipulate the data tables for the linked object, item, character, condition, & value etc...
Additional Info
!important: The object names are case sensitive.
Syntax:
getObject("path[object]")
Example 1: Quick getObject method; you must take care when using this method, that your project does not contain multiple objects with the same name.
-- This method is unsafe because it accesses all the condition/value tables associated with the project
getObject("Conditions[condition_name]") -- get a condition
getObject("Values[value_name]") -- get a value
getObject("Actions[action_name]") -- get an action
getObject("Animations[animation_name]") -- get an animation
Example 2: Full getObject method.
-- * scenes * --
getObject("Scenes[scene_name].SceneConditions[condition_name]") -- get condition linked to a scene
getObject("Scenes[scene_name].SceneObjects[object_name].ObjectConditions[condition_name]") -- get condition linked to a scene object
getObject("Scenes[scene_name].SceneValues[value_name]") -- get value linked to a scene
getObject("Scenes[scene_name].SceneObjects[object_name].ObjectValues[value_name]") -- get value linked to a scene object
getObject("Scenes[scene_name].SceneActions[action_name]") --
getObject("scenes[scene_name].SceneObjects[object_name].ObjectAnimations[animation_name]") -- get animation linked to a scene object
-- * characters * --
Arguments
Path: "string" path to required data structure object.
Object: name of the object, character, condition etc; the name is case sensitive.
Flags
none
Return
none