{"name":"addRating","operator":null,"title":"addRating","type":"command","url":"https://community.bistudio.com/wiki/addRating","revid":353042,"updated":"2024-03-12T12:07:04Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"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":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"description":"Add a number to the rating of a unit - negative values can be used to reduce the rating.\n\nThis command is usually used to reward for completed mission objectives.The rating is given at the end of the mission and is automatically adjusted when killing enemies or friendlies.\n\nWhen the rating gets below -2000, the unit's side switches to sideEnemy and the unit is attacked by everyone.\n\n> [!NOTE]\n> See also ArmA: Armed Assault: Rating Values and Arma 3: Event Handlers#HandleRating.","syntaxes":[{"syntax":"unitName addRating rating","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":"rating","type":"Number","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"rating: Number"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unitName","types":["Object"]},"right":{"text":"rating","types":["Number"]}}],"examples":[{"text":"```sqf\nplayer addRating 2000;\n```","code":["player addRating 2000;"]},{"text":"Set the rating to a specific value:\n\n```sqf\nprivate _wantedRating = 9001;\nplayer addRating (_wantedRating - rating player);\n```","code":["private _wantedRating = 9001;\nplayer addRating (_wantedRating - rating player);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Side Relations","ArmA: Rating Values","rating","rank","setUnitRank","sideEnemy"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}