action: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "[[Category:Scripting_Commands_Take_On_Helicopters" to "[[Category:Scripting Commands Take On Helicopters") |
Lou Montana (talk | contribs) (Description refresh) |
||
Line 6: | Line 6: | ||
|1.00|Game version= | |1.00|Game version= | ||
<!-- | |||
|arg= local |Multiplayer Arguments= | |arg= local |Multiplayer Arguments= | ||
--> | |||
|eff= global |Multiplayer Effects= | |eff= global |Multiplayer Effects= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Make a unit | | Make a unit perform an action. See [[:Category:Actions]] for action names and syntaxes. | ||
{{Important | The argument's [[Multiplayer Scripting#Locality|locality]] is ''usually'' local, but some actions can take a global argument (e.g "Eject", "GetOut", "GetInXXXX", "MoveToXXXX"). See [[:Category:Actions]] for more details.}} | |||
{{Informative | In Singleplayer, when user Alt-Tabs the simulation is paused and so the action will also halt until user returns to the game. For example, {{Inline code|[[player]] [[action]] ["GetInDriver", car];}} executed while user is Alt-Tabbed will result in the user seeing the action happening when he returns to the game screen. This doesn't happen in Multiplayer.}} |DESCRIPTION= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| unit | | unit [[action]] actionArray |SYNTAX= | ||
|p1= unit: [[Object]] |PARAMETER1= | |p1= unit: [[Object]] |PARAMETER1= | ||
Line 33: | Line 33: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[actionIDs]], [[actionParams]], [[addAction]], [[setUserActionText]], [[inGameUISetEventHandler]], [[showHUD]], [[inputAction]], [[removeAction]], [[removeAllActions]]|SEEALSO= | ||
}} | }} | ||
Line 40: | Line 40: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
< | <dd class="notedate">Posted on 28 Aug, 2009</dd> | ||
<dt class="note">[[User:Tom_48_97|tom_48_97]]</dt> | |||
[[ | <dd class="note"> | ||
In Arma 2, you can place a unique unit (for example a boat, far of all combats) and use it for all command lines with action. | |||
</dd> | |||
<dd class="notedate">Posted on March 27, 2015 - 17:57 (UTC)</dd> | <dd class="notedate">Posted on March 27, 2015 - 17:57 (UTC)</dd> | ||
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt> | <dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt> | ||
Line 65: | Line 52: | ||
This command has no effect when a dead unit is used as input. | This command has no effect when a dead unit is used as input. | ||
</dd> | </dd> | ||
<dd class="notedate">Posted on June 27, 2017 - 02:15 (UTC)</dd> | <dd class="notedate">Posted on June 27, 2017 - 02:15 (UTC)</dd> | ||
<dt class="note">[[User:DrSova|DrSova]]</dt> | <dt class="note">[[User:DrSova|DrSova]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
<code>player action ["SWITCHWEAPON",player,player,-1]</code> | <code>[[player]] [[action]] ["SWITCHWEAPON", [[player]], [[player]], -1]</code> | ||
Switching weapon to the back. | Switching weapon to the back. | ||
</dd> | </dd> | ||
<dd class="notedate">Posted on July 20, 2017 - 12:22 (UTC)</dd> | <dd class="notedate">Posted on July 20, 2017 - 12:22 (UTC)</dd> | ||
<dt class="note">[[User:Yuval|Yuval]]</dt> | <dt class="note">[[User:Yuval|Yuval]]</dt> | ||
Line 86: | Line 65: | ||
Some of the actions (such as "DropWeapon") do not always execute, and there should be a set of conditions for them to run. | Some of the actions (such as "DropWeapon") do not always execute, and there should be a set of conditions for them to run. | ||
The unit must be able to perform the dropping animation in order for the action to properly execute. | The unit must be able to perform the dropping animation in order for the action to properly execute. | ||
So, if for example we spawn a unit at [0,0,0] and make it perform a "DropWeapon" action - it won't work if [0,0,0] is water (which it is, if the current map is an island) because the unit will be swimming.<br><br | So, if for example we spawn a unit at [0,0,0] and make it perform a "DropWeapon" action - it won't work if [0,0,0] is water (which it is, if the current map is an island) because the unit will be swimming.<br> | ||
<br> | |||
Also, you cannot stack up actions right after the other. If you run a "DropWeapon" action when the current action animation is still going - it will not perform. | Also, you cannot stack up actions right after the other. If you run a "DropWeapon" action when the current action animation is still going - it will not perform. | ||
There are a few more conditions for an action to perform, but relying on a hundred percent success of the action is not a good practice. | There are a few more conditions for an action to perform, but relying on a hundred percent success of the action is not a good practice. | ||
</dd> | </dd> | ||
<!-- Note Section END --> | |||
</dl> | </dl> | ||
< | |||
<h3 style="display:none">Bottom Section</h3> | |||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.46|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Command Group: Unit Control|{{uc:{{PAGENAME}}}}]] |
Revision as of 12:04, 2 May 2020
Description
- Description:
- Make a unit perform an action. See Category:Actions for action names and syntaxes.
- Groups:
- Uncategorised
Syntax
Examples
Additional Information
- See also:
- actionIDsactionParamsaddActionsetUserActionTextinGameUISetEventHandlershowHUDinputActionremoveActionremoveAllActions
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on 28 Aug, 2009
- tom_48_97
- In Arma 2, you can place a unique unit (for example a boat, far of all combats) and use it for all command lines with action.
- Posted on March 27, 2015 - 17:57 (UTC)
- DreadedEntity
- This command has no effect when a dead unit is used as input.
- Posted on June 27, 2017 - 02:15 (UTC)
- DrSova
-
player action ["SWITCHWEAPON", player, player, -1]
Switching weapon to the back. - Posted on July 20, 2017 - 12:22 (UTC)
- Yuval
-
Some of the actions (such as "DropWeapon") do not always execute, and there should be a set of conditions for them to run.
The unit must be able to perform the dropping animation in order for the action to properly execute.
So, if for example we spawn a unit at [0,0,0] and make it perform a "DropWeapon" action - it won't work if [0,0,0] is water (which it is, if the current map is an island) because the unit will be swimming.
Also, you cannot stack up actions right after the other. If you run a "DropWeapon" action when the current action animation is still going - it will not perform. There are a few more conditions for an action to perform, but relying on a hundred percent success of the action is not a good practice.
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands: Global Effect
- Scripting Commands OFP 1.46
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- Scripting Commands ArmA
- Scripting Commands Arma 2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters
- Command Group: Unit Control