switchAction: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
m (Text replacement - "\|x([0-9])= <sqf>([^\/: ]+)([^;])<\/sqf>" to "|x$1= <sqf>$2$3;</sqf>")
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| When used on a person, the given action is started immediately (there is no transition). Use switchmove "" to switch back to the default movement if there is no transition back, otherwise the person may be stuck. |= Description
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| soldier '''switchAction''' action |= Syntax
|game4= arma3
|version4= 0.50


|p1= soldier: [[Object]] |= PARAMETER1
|gr1= Unit Control


|p2= action: [[String]] |= PARAMETER2
|gr2= Animations


|p3= |= PARAMETER3
|descr= When used on a person, the given action is started immediately (there is no transition). Use switchmove "" to switch back to the default movement if there is no transition back, otherwise the person may be stuck.


| [[Nothing]] |= RETURNVALUE
|s1= soldier [[switchAction]] action


|p1= soldier: [[Object]]


|x1= <code>soldierOne [[switchAction]] "SitDown"</code>|= EXAMPLE1
|p2= action: [[String]]


____________________________________________________________________________________________
|r1= [[Nothing]]


| [[playAction]], [[playActionNow]], [[switchMove]] |= SEEALSO
|x1= <sqf>soldierOne switchAction "SitDown";</sqf>


| |= MPBEHAVIOUR
|seealso= [[playAction]] [[playActionNow]] [[switchMove]]
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 23:43, 28 June 2022

Hover & click on the images for description

Description

Description:
When used on a person, the given action is started immediately (there is no transition). Use switchmove "" to switch back to the default movement if there is no transition back, otherwise the person may be stuck.
Groups:
Unit ControlAnimations

Syntax

Syntax:
soldier switchAction action
Parameters:
soldier: Object
action: String
Return Value:
Nothing

Examples

Example 1:
soldierOne switchAction "SitDown";

Additional Information

See also:
playAction playActionNow switchMove

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