Difference between revisions of "StopAction"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: | Line 1: | ||
− | + | ==stopAction== | |
− | |||
− | |||
− | |||
− | |||
+ | <div class="command-min-version-info">Available since: <span class="command-min-version">v3.0</span></div> | ||
− | + | <div class="command-doc">Stops a running action. If the action is not found (because it is not running) nothing happens.</div> | |
− | + | Lua Syntax: | |
− | + | <pre class="command-syntax">stopAction(action)</pre> | |
+ | ===Arguments=== | ||
+ | ====action==== | ||
+ | :'''"object path"|"object id"|object''' - Visionaire object which specifies an action. | ||
+ | ===Flags=== | ||
+ | ===Return Values=== | ||
+ | None. | ||
+ | ===Examples=== | ||
+ | Example 1: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
stoptAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]") | stoptAction("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]") | ||
stoptAction(act) | stoptAction(act) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 17:12, 22 November 2013
stopAction
Available since: v3.0
Stops a running action. If the action is not found (because it is not running) nothing happens.
Lua Syntax:
stopAction(action)
Arguments
action
- "object path"|"object id"|object - Visionaire object which specifies an action.
Flags
Return Values
None.
Examples
Example 1:
stoptAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")
Example 2:
local act = getObject("Actions[action_name]")
stoptAction(act)