Difference between revisions of "StartAction"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: | Line 1: | ||
− | + | ==startAction== | |
− | |||
− | |||
− | |||
− | |||
+ | <div class="command-min-version-info">Available since: <span class="command-min-version">v3.0</span></div> | ||
− | + | <div class="command-doc">Starts an action. If the action is already running a new active action for the action data object is started.</div> | |
− | + | Lua Syntax: | |
− | + | <pre class="command-syntax">startAction(action)</pre> | |
+ | ===Arguments=== | ||
+ | ====action==== | ||
+ | :'''"object path"|"object id"|object''' - Visionaire object which specifies an action. | ||
+ | ===Flags=== | ||
+ | ===Return Values=== | ||
+ | ;visionaireObject | ||
+ | :The visionaire object representing the active action. | ||
+ | ===Examples=== | ||
+ | Example 1: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
startAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]") | startAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]") | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Example 2: | |
− | Example 2: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | |||
local act = getObject("Actions[action_name]") | local act = getObject("Actions[action_name]") | ||
startAction(act) | startAction(act) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 17:12, 22 November 2013
startAction
Available since: v3.0
Starts an action. If the action is already running a new active action for the action data object is started.
Lua Syntax:
startAction(action)
Arguments
action
- "object path"|"object id"|object - Visionaire object which specifies an action.
Flags
Return Values
- visionaireObject
- The visionaire object representing the active action.
Examples
Example 1:
startAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")
Example 2:
local act = getObject("Actions[action_name]")
startAction(act)