GetObject (CMS)

From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 16:11, 21 February 2014 by AFRLme (talk) (Created page with "<div class="toccolours mw-collapsible mw-collapsed tbl-ds"> <span class="bold">Command History</span> <div class="mw-collapsible-content"> <div class="alt-bg">Available since ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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[door_open]") -- get a condition
getObject("Values[money]") -- get a value

Example 2: Full getObject method.

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

-- let's check if the stored cursor position equals another x,y value! if curPos.x == 200 and curPos.y == 400 then

-- do some action!

else

-- do some other action!

end </syntaxhighlight>


Arguments

none


Flags

none


Return

pos
Table containing x,y values of current mouse cursor position


Relevant Pages: setCursorPos