---
name: "BIS_fnc_respect"
type: function
status: ok
groups: ["Sides"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_respect
revid: 323931
updated: 2022-07-01T11:58:28Z
---

# BIS_fnc_respect

*Function · Sides · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

RESpect - The Effective Calculation Process.

## Syntax

```sqf
[mode, param1, param2, param3] call BIS_fnc_respect
```

**Parameters:**

- `mode`: [String](../topics/String.md) - **case-sensitive**, can be one of "SET", "ADD", "MODIFY", "KILLED"
- depending on *mode*:
  - "SET" - set respect default values
    - param1: [Nothing](../topics/Nothing.md) or [Object](../topics/Object.md) (see **Return value**)
  - "ADD" - add respect values depending on global town respect
    - param1: [Object](../topics/Object.md) - unit to which is given respect from assigned town with random difference defined in third argument
    - param2: [Number](../topics/Number.md) - range of random difference
  - "MODIFY" - change given respect value
    - param1: [Object](../topics/Object.md) - unit of which respect value will be changed
    - param2: [String](../topics/String.md) - [faction](../commands/faction.md) of which respect will be changed
    - param3: [String](../topics/String.md) - [code](../topics/Code.md) which defines formula for change (current respect value is stored in variable _r) - e.g. "_r / 2"
  - "KILLED" - modify global town respect after civilian has been killed
    - param1: [Object](../topics/Object.md) - killer
    - param2: [Object](../topics/Object.md) - town logic
    - param3: [Number](../topics/Number.md) - change coefficient

**Returns:** - "SET": [Array](../topics/Array.md) with zero respect values  (if [Object](../topics/Object.md) is passed as argument, 1 is on place of object's faction)
- "ADD": unit's respect values
- "MODIFY": modified respect value
- "KILLED": modified town respect value

## See also

[addRating](../commands/addRating.md) · Ambient Civilians

<sub>Source: [BI Community Wiki — BIS fnc respect](https://community.bistudio.com/wiki/BIS_fnc_respect) (revision 323931).</sub>
