setUnitRank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(73 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= ofpe
|version1= 1.00


|1.00|= Game version
|game2= arma1
____________________________________________________________________________________________
|version2= 1.00


| Sets rank of given unit.
|game3= arma2
|version3= 1.00


Possible rank values, and the associated [[rating]] that is automatically given:
|game4= arma2oa
* PRIVATE: 0
|version4= 1.50
* CORPORAL: 500
* SERGEANT: 1500
* LIEUTENANT: 2500
* CAPTAIN: 3500
* MAJOR: 5000
* COLONEL: 7500 |= Description
____________________________________________________________________________________________


| [[Object#Unit|Unit]] '''setUnitRank''' "rank" |= Syntax
|game5= tkoh
|version5= 1.00


|p1= [[Object#Unit|Unit]]: [[Object]] |= Parameter 1
|game6= arma3
|version6= 0.50


|p2= rank: [[String]] As above|= Parameter 2
|arg= global


| [[Nothing]] |= Return value
|eff= global
____________________________________________________________________________________________
 
|x1= <pre>player setUnitRank "COLONEL"</pre> |= Example 1
____________________________________________________________________________________________


| [[rank]], [[rating]] |= See also
|gr1= Unit Identity


}}
|descr= Sets rank of given unit.
 
Possible rank values, and the associated [[rating]] that is '''set''' (not added, the value replaces previous rating) with it:
 
{{{!}} class="wikitable" style="text-align: center"
! colspan="2" {{!}} Ranks
! PRIVATE
! CORPORAL
! SERGEANT
! LIEUTENANT
! CAPTAIN
! MAJOR
! COLONEL
{{!}}-
! rowspan="3" {{!}} Ratings
!
{{Name|arma1|short}}<br>
{{Name|arma2|short}}<br>
{{Name|arma2oa|short}}<br>
{{Name|tkoh|short}}
{{!}} 0
{{!}} 500
{{!}} 1500
{{!}} 2500
{{!}} 3500
{{!}} 5000
{{!}} 7500
{{!}}-
! {{Name|arma3|short}} (ca 2015)
{{!}} 0
{{!}} 50
{{!}} 150
{{!}} 250
{{!}} 350
{{!}} 500
{{!}} 750
{{!}}-
! {{Name|arma3|short}}
{{!}} 0
{{!}} 0
{{!}} 0
{{!}} 0
{{!}} 0
{{!}} 0
{{!}} 0
{{!}}}
 
{{Feature|arma3|Before {{arma3}} v1.68 and in previous titles, this command was {{Icon|globalArgument|32}} {{Icon|localEffect|32}}.}}
 
|s1= unitName [[setUnitRank]] rank
 
|p1= unitName: [[Object]]
 
|p2= rank: [[String]] - see above. If a wrong string is provided, the command errors and reverts to using "PRIVATE"


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>player setUnitRank "COLONEL";</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[ArmA: Armed Assault: Rating Values|Rating Values]] [[rating]] [[addRating]] [[rank]] [[setRank]]
[[Category:Scripting Commands|SETUNITRANK]]
}}
[[Category:Scripting Commands OFP Elite |SETUNITRANK]]
[[Category:Scripting Commands ArmA|SETUNITRANK]]
[[Category:Command_Group:_Object_Manipulation|{{uc:{{PAGENAME}}}}]]

Latest revision as of 18:03, 29 April 2023

Hover & click on the images for description

Description

Description:
Sets rank of given unit. Possible rank values, and the associated rating that is set (not added, the value replaces previous rating) with it:
Ranks PRIVATE CORPORAL SERGEANT LIEUTENANT CAPTAIN MAJOR COLONEL
Ratings

ArmA
Arma 2
Arma 2:OA
TKOH

0 500 1500 2500 3500 5000 7500
Arma 3 (ca 2015) 0 50 150 250 350 500 750
Arma 3 0 0 0 0 0 0 0
Arma 3
Before Arma 3 v1.68 and in previous titles, this command was GAGlobal LELocal.
Groups:
Unit Identity

Syntax

Syntax:
unitName setUnitRank rank
Parameters:
unitName: Object
rank: String - see above. If a wrong string is provided, the command errors and reverts to using "PRIVATE"
Return Value:
Nothing

Examples

Example 1:
player setUnitRank "COLONEL";

Additional Information

See also:
Rating Values rating addRating rank setRank

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