Global Command: startAction

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

Starts an action.

Related functions stopAction


Syntax

startAction(action)


Parameters

Parameter Type Description
action TVisObj Visionaire object representing an action.


Return values

Type Description
TVisObj The Visionaire object representing the active action.


Examples

Example 1: Start an action.

local myAction = Actions["action_name"]
startAction(myAction)


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