Arma 3 Scripting

Command in Object Manipulation

addRating

Also available as Markdown and JSON, or read the original wiki page.

Description

Add a number to the rating of a unit - negative values can be used to reduce the rating.

This 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.

When the rating gets below -2000, the unit's side switches to sideEnemy and the unit is attacked by everyone.

Note

See also ArmA: Armed Assault: Rating Values and Arma 3: Event Handlers#HandleRating.

Syntax

unitName addRating rating

Parameters:

Returns: Nothing

Examples

Example 1

player addRating 2000;

Example 2

Set the rating to a specific value:

private _wantedRating = 9001;
player addRating (_wantedRating - rating player);

See also

Side Relations · ArmA: Rating Values · rating · rank · setUnitRank · sideEnemy