Difference between revisions of "StopAction"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 16: Line 16:
 
Example 1:  
 
Example 1:  
 
<syntaxhighlight>
 
<syntaxhighlight>
stoptAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")
+
stopAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")
 
</syntaxhighlight>
 
</syntaxhighlight>
 
Example 2:  
 
Example 2:  
Line 23: Line 23:
 
stoptAction(act)
 
stoptAction(act)
 
</syntaxhighlight>
 
</syntaxhighlight>
[[Category:Player Commands]]
 

Revision as of 22:28, 30 September 2014

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:

stopAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")

Example 2:

local act = getObject("Actions[action_name]")
stoptAction(act)