|
|
| (11 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| − | <div class="toccolours mw-collapsible mw-collapsed tbl-ds">
| + | #REDIRECT [[Global Command: getObject]] |
| − | <span class="bold">Command History</span>
| |
| − | <div class="mw-collapsible-content">
| |
| − | <div class="alt-bg">Available since v3.0</div>
| |
| − | </div></div>
| |
| − | | |
| − | Allows you to access, read & manipulate the data tables for the linked object, item, character, condition, & value etc...
| |
| − | | |
| − | <div class="toccolours mw-collapsible mw-collapsed tbl-ds">
| |
| − | <span class="bold">Additional Info</span>
| |
| − | <div class="mw-collapsible-content">
| |
| − | <div>''!important'': The object names are case sensitive.</div>
| |
| − | </div></div>
| |
| − | | |
| − | | |
| − | Syntax:
| |
| − | <syntaxhighlight>
| |
| − | getObject("path[object]")
| |
| − | </syntaxhighlight>
| |
| − | | |
| − | | |
| − | 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.
| |
| − | <syntaxhighlight>
| |
| − | -- 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
| |
| − | </syntaxhighlight>
| |
| − | | |
| − | Example 2: Full getObject method.
| |
| − | <syntaxhighlight>
| |
| − | 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
| |
| − | </syntaxhighlight>
| |
| − | | |
| − | -- 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>
| |
| − | | |
| − | | |
| − | | |
| − | <span class="bold underline">Arguments</span>
| |
| − | | |
| − | none
| |
| − | | |
| − | | |
| − | <span class="bold underline">Flags</span>
| |
| − | | |
| − | none
| |
| − | | |
| − | | |
| − | <span class="bold underline">Return</span>
| |
| − | | |
| − | <span class="bold">pos</span> <br/>
| |
| − | Table containing x,y values of current mouse cursor position
| |
| − | {{i18n|GetCursorPos_(CMS)}} <br/>
| |
| − | {| class="tbl-ds"
| |
| − | |-
| |
| − | |<span class="bold">Relevant Pages</span>: [[SetCursorPos_(CMS)|setCursorPos]]
| |
| − | |}
| |