Global Command: stopAction

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected from StopAction)

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)")