Difference between revisions of "StartAction"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 42: Line 42:
 
<b>action</b>: path <br/>
 
<b>action</b>: path <br/>
 
The path to the action to be started! ("path"."object_id"."action")
 
The path to the action to be started! ("path"."object_id"."action")
 +
  
 
<b><u>Flags</u></b>  
 
<b><u>Flags</u></b>  

Revision as of 19:12, 8 March 2013

Command History

Available since v3.7


Allows you to start any "called by other action" you include!


Syntax:

startAction(action)


Example 1: basic start action method

--[[
!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!
startAction("Actions[action_name]")


-- full get action method; !recommended
startAction("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")

Example 2: start action via a variable

-- you can of course use variables with actions stored in them instead!
local act = getObject("Actions[action_name]")
startAction(act)


Arguments

action: path
The path to the action to be started! ("path"."object_id"."action")


Flags

none


Return

visionaireObject
The visionaire object representing the active action!


Relevant Pages: stopAction