{"name":"setUnitRank","operator":null,"title":"setUnitRank","type":"command","url":"https://community.bistudio.com/wiki/setUnitRank","revid":340312,"updated":"2023-04-29T17:03:09Z","groups":["Unit Identity"],"status":"ok","replaced_by":[],"games":[{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"global","server_exec":false},"exec":null,"description":"Sets rank of given unit.\n\nPossible rank values, and the associated rating that is **set** (not added, the value replaces previous rating) with it:\n\n| Ranks | PRIVATE | CORPORAL | SERGEANT | LIEUTENANT | CAPTAIN | MAJOR | COLONEL |  |\n|---|---|---|---|---|---|---|---|---|\n| Ratings | ArmA<br>Arma 2<br>Arma 2:OA<br>Take On Helicopters | 0 | 500 | 1500 | 2500 | 3500 | 5000 | 7500 |\n| Arma 3 (ca 2015) | 0 | 50 | 150 | 250 | 350 | 500 | 750 |  |\n| Arma 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |\n\n> [!NOTE]\n> **Arma 3:** Before Arma 3 v1.68 and in previous titles, this command was Global Argument Local Effect.","syntaxes":[{"syntax":"unitName setUnitRank rank","since":null,"effect":null,"exec":null,"params":[{"name":"unitName","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unitName: Object"},{"name":"rank","type":"String","optional":false,"default":null,"description":"see above. If a wrong string is provided, the command errors and reverts to using \"PRIVATE\"","types":["String"],"since":null,"text":"rank: String - see above. If a wrong string is provided, the command errors and reverts to using \"PRIVATE\""}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unitName","types":["Object"]},"right":{"text":"rank","types":["String"]}}],"examples":[{"text":"```sqf\nplayer setUnitRank \"COLONEL\";\n```","code":["player setUnitRank \"COLONEL\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ArmA: Armed Assault: Rating Values","rating","addRating","rank","setRank"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Identity","Introduced with Operation Flashpoint: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}