|
|
(13 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | <div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
| + | #REDIRECT [[Global Command: startAction]] |
− | <b>Command History</b>
| |
− | <div class="mw-collapsible-content">
| |
− | Available since <span style="color:green">v3.7</span>
| |
− | </div></div>
| |
− | | |
− | | |
− | Allows you to start any "called by other action" you include!
| |
− | | |
− | | |
− | Syntax:
| |
− | <syntaxhighlight>
| |
− | startAction(action)
| |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | Example 1: basic start action method
| |
− | <syntaxhighlight enclose="div">
| |
− | --[[
| |
− | !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([getObject("Actions[action_name]")]) | |
− | | |
− | | |
− | -- full get action method; !recommended
| |
− | startAction([getObject("Scenes[scene_name].SceneObjects[object_name].SceneActions[action_name]")])
| |
− | </syntaxhighlight>
| |
− | | |
− | Example 2: start action via a variable
| |
− | <syntaxhighlight>
| |
− | -- you can of course use variables with actions stored in them instead!
| |
− | local act = getObject("Actions[action_name]")
| |
− | startAction(act)
| |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | | |
− | <b><u>Arguments</u></b>
| |
− | | |
− | action: link <br/>
| |
− | The link to the action to be started! ("path"|"object_id"|"action_name")
| |
− | | |
− | Flags: none
| |
− | | |
− | Return: visionaireObject <br/>
| |
− | The visionaire object representing the active action!
| |
− | {{i18n|StartAction}}
| |