Difference between revisions of "StopAction"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected page to Global Command: stopAction)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
+
#REDIRECT [[Global Command: stopAction]]
<b>Command History</b>
 
<div class="mw-collapsible-content">
 
<div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v3.7</span></div>
 
</div></div>
 
 
 
 
 
Allows you to stop any "called by other action" you include!
 
 
 
 
 
Syntax:
 
<syntaxhighlight>
 
stopAction(action)
 
</syntaxhighlight>
 
 
 
 
 
Example 1: basic stop action method
 
<syntaxhighlight enclose="div">
 
--[[
 
!important: you must take care when using this method that you don't have multiple instances of actions with the same name otherwise it will not work correctly!
 
--]]
 
 
 
-- shortened get action method; !important: see comment above!
 
stoptAction("Actions[action_name]")
 
 
 
 
 
-- full get action method; !recommended
 
stoptAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")
 
</syntaxhighlight>
 
 
 
Example 2: stop action via a variable
 
<syntaxhighlight>
 
-- you can of course use variables with actions stored in them instead!
 
local act = getObject("Actions[action_name]")
 
stoptAction(act)
 
</syntaxhighlight>
 
 
 
 
 
 
 
<b><u>Arguments</u></b>
 
 
 
<b>action</b>: path <br/>
 
The path to the action to be stopped! ("path"."object_id"."action")
 
 
 
 
 
<b><u>Flags</u></b>
 
 
 
none
 
 
 
<b><u>Return</u></b>
 
 
 
none
 
{{i18n|StopAction}} <br/>
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
|-
 
|<b>Relevant Pages</b>: [[StartpAction|startAction]]
 
|}
 

Latest revision as of 13:36, 19 May 2023