Difference between revisions of "StopAction"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: | Line 1: | ||
− | <div class="toccolours mw-collapsible mw-collapsed" | + | <div class="toccolours mw-collapsible mw-collapsed tbl-ds"> |
− | + | <span class="bold">Command History</span> | |
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
− | <div | + | <div class="alt-bg">Available since v3.7</div> |
</div></div> | </div></div> | ||
Line 18: | Line 18: | ||
<syntaxhighlight enclose="div"> | <syntaxhighlight enclose="div"> | ||
--[[ | --[[ | ||
− | !important: you must take care when using this method that | + | !important: you must take care when using this method that there is only one instance of the action you are calling. |
--]] | --]] | ||
Line 38: | Line 38: | ||
− | < | + | <span class="bold underline">Arguments</span> |
− | < | + | <span class="bold">action</span>: path <br/> |
The path to the action to be stopped! ("path"."object_id"."action") | The path to the action to be stopped! ("path"."object_id"."action") | ||
− | < | + | <span class="bold underline">Flags</span> |
none | none | ||
− | < | + | <span class="bold underline">Return</span> |
none | none | ||
{{i18n|StopAction}} <br/> | {{i18n|StopAction}} <br/> | ||
− | {| | + | {| class="tbl-ds" |
|- | |- | ||
− | |< | + | |<span class="bold">Relevant Pages</span>: [[StartAction|startAction]] |
|} | |} |
Revision as of 13:23, 4 April 2013
Command History
Available since v3.7
Allows you to stop any "called by other action" you include!
Syntax:
stopAction(action)
Example 1: basic stop action method
--[[
!important: you must take care when using this method that there is only one instance of the action you are calling.
--]]
-- 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]")
Example 2: stop action via a variable
-- you can of course use variables with actions stored in them instead!
local act = getObject("Actions[action_name]")
stoptAction(act)
Arguments
action: path
The path to the action to be stopped! ("path"."object_id"."action")
Flags
none
Return
none
日本語 – 正體中文 – 한국어 – Dansk – Deutsch – English – Español – Français – Italiano – Nederlands – Polski – Português – Svenska – Русский |
Relevant Pages: startAction |