---
name: "BIN_fnc_setTargetWeight"
type: function
status: ok
groups: ["Behavior"]
arma3_since: "1.94"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIN_fnc_setTargetWeight
revid: 286101
updated: 2021-06-20T17:25:47Z
---

# BIN_fnc_setTargetWeight

*Function · Behavior · Arma 3 v1.94*

## Description

BIN_fnc_setTargetWeight Set target priroty which is used later by BIN_fnc_findTargetWeight function to find target.

> [!NOTE]
> This content is exclusive to the Arma 3 Contact Expansion.

## Syntax

*syntax inferred from the function header*

```sqf
[param0, param1] call BIN_fnc_setTargetWeight
```

**Parameters:**

- `param0` — 0: _input - Unit, vehicle, group or side.
- `param1` — 1: _value - scalar above 0 - weight which is later used by selectRandomWeighted script command. Values equal or less than 0 are excluded from target selection

**Returns:** 

## Examples

### Example 1

```sqf
[west,0] call BIN_fnc_setTargetWeight - all units from side "west" will be ignored by targeting system
[player,10] call BIN_fnc_setTargetWeight - Increase player chance of being targeted by drone weapons
[bis_car,0] call BIN_fnc_setTargetWeight - Vehicle & it is crew will be ignored by targeting system
```

## Function header

The comment at the top of the function's file in the game; this page's params, syntax, examples, description come from it.

```sqf
/*
BIN_fnc_setTargetWeight
Set target priroty which is used later by BIN_fnc_findTargetWeight function to find target.

Input:
    0:
        _input - Unit, vehicle, group or side.
    1:
        _value - scalar above 0 - weight which is later used by selectRandomWeighted script command. Values equal or less than 0 are excluded from target selection

Examples:

    [west,0] call BIN_fnc_setTargetWeight - all units from side "west" will be ignored by targeting system
    [player,10] call BIN_fnc_setTargetWeight - Increase player chance of being targeted by drone weapons
    [bis_car,0] call BIN_fnc_setTargetWeight - Vehicle & it is crew will be ignored by targeting system
*/
```

<sub>Source: [BI Community Wiki — BIN fnc setTargetWeight](https://community.bistudio.com/wiki/BIN_fnc_setTargetWeight) (revision 286101).</sub>
