setUnitRank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Fix Category:Pages using duplicate arguments in template calls and add no rating replacement info)
Line 6: Line 6:
|1.00|Game version=
|1.00|Game version=


|arg= global |Multiplayer Effects=
|arg= global |Multiplayer Arguments=
 
|eff= local |Multiplayer Effects=
|eff= local |Multiplayer Effects=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 14: Line 14:


Possible rank values, and the associated [[rating]] that is automatically given:
Possible rank values, and the associated [[rating]] that is automatically given:
* PRIVATE: 0
{{{!}} class{{=}}"bikitable"
* CORPORAL: 500
! rowspan{{=}}"2" {{!}} Rank !! colspan{{=}}"3" {{!}} Ratings
* SERGEANT: 1500
{{!}}-
* LIEUTENANT: 2500
! ArmA 1 !! {{arma2}} !! {{arma3}}
* CAPTAIN: 3500
{{!}}-
* MAJOR: 5000
{{!}} PRIVATE {{!}}{{!}} 0 {{!}}{{!}} ? {{!}}{{!}} 0
* COLONEL: 7500<br><br>
{{!}}-
{{!}} CORPORAL {{!}}{{!}} 500 {{!}}{{!}} ? {{!}}{{!}} 0
{{!}}-
{{!}} SERGEANT {{!}}{{!}} 1500 {{!}}{{!}} ? {{!}}{{!}} 0
{{!}}-
{{!}} LIEUTENANT {{!}}{{!}} 2500 {{!}}{{!}} ? {{!}}{{!}} 0
{{!}}-
{{!}} CAPTAIN {{!}}{{!}} 3500 {{!}}{{!}} ? {{!}}{{!}} 0
{{!}}-
{{!}} MAJOR {{!}}{{!}} 5000 {{!}}{{!}} ? {{!}}{{!}} 0
{{!}}-
{{!}} COLONEL {{!}}{{!}} 7500 {{!}}{{!}} ? {{!}}{{!}} 0
{{!}}}


{{Feature arma3| Since Arma 3 v1.67 this command is {{EffArg|cmd|arg|glob}} {{EffArg|cmd|eff|glob}}}}|DESCRIPTION=
{{Feature arma3| Since {{arma3}} v1.67 this command is {{EffArg|cmd|arg|glob}} {{EffArg|cmd|eff|glob}}}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| unitName '''setUnitRank''' rank |SYNTAX=
| unitName [[setUnitRank]] rank |SYNTAX=


|p1= unitName: [[Object]] |PARAMETER1=
|p1= unitName: [[Object]] |PARAMETER1=


|p2= rank: [[String]] As above|PARAMETER2=
|p2= rank: [[String]] - as above |PARAMETER2=


| [[Nothing]] |RETURNVALUE=
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>player setUnitRank "COLONEL"</pre> |EXAMPLE1=
|x1= <code>[[player]] [[setUnitRank]] "COLONEL";</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[ArmA: Rating Values|Rating Values]], [[rating]], [[addRating]], [[rank]], [[setRank]] |SEEALSO=
| [[ArmA: Rating Values|Rating Values]], [[rating]], [[addRating]], [[rank]], [[setRank]] |SEEALSO=
}}
}}


Line 44: Line 55:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on Mar 26, 2009 - 19:24
<dd class="notedate">Posted on Mar 26, 2009 - 19:24
<dt class="note">'''[[User:Wolfrug|Wolfrug]]'''<dd class="note">
<dt class="note">[[User:Wolfrug|Wolfrug]]
<dd class="note">
Changing a unit's rank using either [[setUnitRank]] or [[setRank]] will also REPLACE their current rating dependent on their new rank (colonels have a rating of 7500 etc). That is to say REPLACE, not add to: the unit's old rating will disappear with the rank change.
Changing a unit's rank using either [[setUnitRank]] or [[setRank]] will also REPLACE their current rating dependent on their new rank (colonels have a rating of 7500 etc). That is to say REPLACE, not add to: the unit's old rating will disappear with the rank change.
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|SETUNITRANK]]
[[Category:Scripting Commands OFP Elite |SETUNITRANK]]
[[Category:Scripting Commands ArmA|SETUNITRANK]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Manipulation|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on December 24, 2015 - 21:10 (UTC)</dd>
<dd class="notedate">Posted on December 24, 2015 - 21:10 (UTC)</dd>
<dt class="note">[[User:Wyattwic|Wyattwic]]</dt>
<dt class="note">[[User:Wyattwic|Wyattwic]]</dt>
Line 74: Line 73:
     (COLONEL: 750)  The rating listed here will be present on base type respawn.
     (COLONEL: 750)  The rating listed here will be present on base type respawn.
</dd>
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on September 14, 2019 - 21:37 (UTC)</dd>
<dd class="notedate">Posted on September 14, 2019 - 21:37 (UTC)</dd>
<dt class="note">[[User:Lou Montana|Lou Montana]]</dt>
<dt class="note">[[User:Lou Montana|Lou Montana]]</dt>
<dd class="note">
<dd class="note">
In {{arma3}} (v1.94), unit's rating is not impacted.
In {{arma3}} (v1.94), unit's rating is reset to '''zero'''. Also, all ranks start with a rating of '''zero'''.
</dd>
</dd>
<!-- Note Section END -->
</dl>
</dl>
<!-- DISCONTINUE Notes -->
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP Elite |{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Manipulation|{{uc:{{PAGENAME}}}}]]

Revision as of 23:59, 14 September 2019

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Sets rank of given unit. Possible rank values, and the associated rating that is automatically given:
Rank Ratings
ArmA 1 Arma 2 Arma 3
PRIVATE 0 ? 0
CORPORAL 500 ? 0
SERGEANT 1500 ? 0
LIEUTENANT 2500 ? 0
CAPTAIN 3500 ? 0
MAJOR 5000 ? 0
COLONEL 7500 ? 0
Arma 3
Since Arma 3 v1.67 this command is Template:EffArg Template:EffArg
Groups:
Uncategorised

Syntax

Syntax:
unitName setUnitRank rank
Parameters:
unitName: Object
rank: String - as above
Return Value:
Nothing

Examples

Example 1:
player setUnitRank "COLONEL";

Additional Information

See also:
Rating ValuesratingaddRatingranksetRank

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 Mar 26, 2009 - 19:24
Wolfrug
Changing a unit's rank using either setUnitRank or setRank will also REPLACE their current rating dependent on their new rank (colonels have a rating of 7500 etc). That is to say REPLACE, not add to: the unit's old rating will disappear with the rank change.
Posted on December 24, 2015 - 21:10 (UTC)
Wyattwic
In Arma 3, if the rank is not spelled correctly or the string is empty, it will default to Private. This command is not case sensitive. For Arma 3 the rating set by this command is as follows. (PRIVATE: 0) (CORPORAL: 50) (SERGEANT: 150) (LIEUTENANT: 250) (CAPTAIN: 350) (MAJOR: 500) (COLONEL: 750) The rating listed here will be present on base type respawn.
Posted on September 14, 2019 - 21:37 (UTC)
Lou Montana
In Arma 3 (v1.94), unit's rating is reset to zero. Also, all ranks start with a rating of zero.

Bottom Section