Difference between revisions of "setUnitPos"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Armed[ _]Assault(\|.*)]]" to "{{GameCategory|arma1|Scripting Commands}}")
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)\]\]" to "{{GameCategory|arma3|Scripting Commands}}")
Line 71: Line 71:
[[Category:Scripting Commands Arma 2|SETUNITPOS]]
[[Category:Scripting Commands Arma 2|SETUNITPOS]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Revision as of 17:41, 9 January 2021

Hover & click on the images for description


Set unit position rules. Mode may be one of:
  • "DOWN" - unit goes prone and stays prone.
  • "UP" - unit stands and stays standing.
  • "MIDDLE" - Kneel Position. ArmA version 1.04 (Unit will not kneel if it is unarmed)
  • "AUTO" - unit chooses mode according to circumstances.
This command will not change the stance of the human player, even though it will change the output of unitPos command. To change player stance use playAction or playActionNow: player playAction "PlayerProne"; // DOWN player playAction "PlayerStand"; // UP player playAction "PlayerCrouch"; // MIDDLE
Unit Control


unit setUnitPos mode
unit: Object
mode: String - as above
Return Value:


Example 1:
_soldier setUnitPos "UP";

Additional Information

See also:


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


Posted on 18 September 2008‎
Command most likely only works if run before join into group after createUnit.
Posted on 11 March 2011
The above comment by Dwarden about 'an additional join required' is no longer true for Operation Arrowhead.
Posted on 26 September 2013‎
A unit might not always go prone when ordered to setUnitPos "DOWN", if the unit doesn't agree with the command. To force the unit to go prone, stop the unit from firing by setCombatMode "BLUE" and then order the unit to prone.

Bottom Section