Global Command: stopAction

From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 12:01, 3 May 2023 by EK (talk | contribs) (Created page with "Stop an active action (an action that is currently being executed). {| class="ts" |- | style="width:15%" | Related functions | startAction |}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Stop an active action (an action that is currently being executed).

Related functions startAction


Syntax

stopAction(action)


Parameters

Parameter Type Description
action TVisObj Visionaire object representing an active action.


Return values

none


Examples

Example 1: Stop an active action.

local myActiveAction = ActiveActions["action_name"]
stopAction(myActiveAction)


Example 2: Start an action and stop it after a certain time, depending on a Visionaire value called "duration" holding the amount of seconds.

local myDelay = Values["duration"].Int
myActiveAction = startAction(Actions["action_name"])

setDelay(myDelay * 1000, "stopAction(myActiveAction)")