setUnitPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|game5= arma2oa |version5= 1.51 " to "|game5= arma2oa |version5= 1.50 ")
m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *C([a-eg-z])" to "$1 - c$2")
 
(15 intermediate revisions by the same user not shown)
Line 2: Line 2:


|game1= ofp
|game1= ofp
|version1= 1.00
|version1= 1.00


|game2= ofpe
|game2= ofpe
|version2= 1.00
|version2= 1.00


|game3= arma1
|game3= arma1
|version3= 1.00
|version3= 1.00


|game4= arma2
|game4= arma2
|version4= 1.00
|version4= 1.00


|game5= arma2oa
|game5= arma2oa
|version5= 1.50
|version5= 1.50


|game6= tkoh
|game6= tkoh
|version6= 1.00
|version6= 1.00


|game7= arma3
|game7= arma3
|version7= 0.50
|version7= 0.50


Line 36: Line 29:


|descr= Set unit position rules. 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]]:
|descr= Set unit position rules. 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]]:
<code>[[player]] [[playAction]] "PlayerProne"; // DOWN
<sqf>player playAction "PlayerProne"; // DOWN
[[player]] [[playAction]] "PlayerStand"; // UP
player playAction "PlayerStand"; // UP
[[player]] [[playAction]] "PlayerCrouch"; // MIDDLE</code>
player playAction "PlayerCrouch"; // MIDDLE</sqf>


|s1= unit '''setUnitPos''' mode
|s1= unit [[setUnitPos]] mode


|p1= unit: [[Object]]
|p1= unit: [[Object]]


|p2= mode: [[String]] - Can be:
|p2= mode: [[String]] - can be:
* "DOWN" - Unit goes prone and stays prone.
* "DOWN" - Unit goes prone and stays prone.
* "UP" - Unit stands and stays standing.
* "UP" - Unit stands and stays standing.
Line 51: Line 44:


|r1= [[Nothing]]
|r1= [[Nothing]]
 
|x1= <code>_soldier [[setUnitPos]] "UP";</code>


|seealso= [[setUnitPosWeak]], [[unitPos]]
|x1= <sqf>_soldier setUnitPos "UP";</sqf>
 
|seealso= [[setUnitPosWeak]] [[unitPos]]
}}
}}


<dl class="command_description">
<dl class="command_description">
<dt><dt>
<dt><dt>
<dd class="notedate">Posted on 18 September 2008‎ </dd>
<dd class="notedate">Posted on 18 September 2008 </dd>
<dt class="note">[[User:Dwarden|Dwarden]]</dt>
<dt class="note">[[User:Dwarden|Dwarden]]</dt>
<dd class="note">
<dd class="note">
Line 69: Line 63:
The above  comment by [[User:Dwarden|Dwarden]] about 'an additional join required' is no longer true for Operation Arrowhead.
The above  comment by [[User:Dwarden|Dwarden]] about 'an additional join required' is no longer true for Operation Arrowhead.
<dt><dt>
<dt><dt>
<dd class="notedate">Posted on 26 September 2013‎</dd>
<dd class="notedate">Posted on 26 September 2013</dd>
<dt class="note">[[User:Katulobotomia|Katulobotomia]]</dt>
<dt class="note">[[User:Katulobotomia|Katulobotomia]]</dt>
<dd class="note">
<dd class="note">

Latest revision as of 14:59, 8 November 2023

Hover & click on the images for description

Description

Description:
Set unit position rules. 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
Groups:
Unit Control

Syntax

Syntax:
unit setUnitPos mode
Parameters:
unit: Object
mode: String - can be:
  • "DOWN" - Unit goes prone and stays prone.
  • "UP" - Unit stands and stays standing.
  • "MIDDLE" - Kneel Position. Logo A1 black.png1.04 - Unit will not kneel if it is unarmed
  • "AUTO" - Unit chooses mode according to circumstances.
Return Value:
Nothing

Examples

Example 1:
_soldier setUnitPos "UP";

Additional Information

See also:
setUnitPosWeak unitPos

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
Posted on 18 September 2008
Dwarden
Command most likely only works if run before join into group after createUnit.
Posted on 11 March 2011
kju
The above comment by Dwarden about 'an additional join required' is no longer true for Operation Arrowhead.
Posted on 26 September 2013
Katulobotomia
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.