---
name: "BIS_fnc_moduleDamage"
type: function
status: ok
groups: ["Modules"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_moduleDamage
revid: 352163
updated: 2024-02-01T23:25:25Z
---

# BIS_fnc_moduleDamage

*Function · Modules · Arma 3 v1.00*

## Description

Damage given vehicles.

> [!NOTE]
> Regarding locality: if a hitpoint is defined,
> Local Argument [setHitPointDamage](../commands/setHitPointDamage.md) is used. Else,
>
> Global Argument [setDamage](../commands/setDamage.md) is used.

## Syntax

```sqf
[logic, vehicles, isActivated] call BIS_fnc_moduleDamage
```

**Parameters:**

- `logic`: [Object](../topics/Object.md) - the logic. Possible [setVariable](../commands/setVariable.md) parameter:
  - "value": [Number](../topics/Number.md) - (Optional, default 0) wanted damage, in range 0..1
  - "bodypart": [String](../topics/String.md) - (Optional, default "0") [setHitPointDamage](../commands/setHitPointDamage.md) hitpoint name
- `vehicles`: [Array](../topics/Array.md) of [Object](../topics/Object.md)s - list of vehicles
- `isActivated`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) if [true](../commands/true.md), the fuel is set

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) when done, even if *isActivated* equals [false](../commands/false.md)

## Examples

### Example 1

```sqf
[myLogic, vehicle player, true] call BIS_fnc_moduleDamage;
```

## See also

[setDamage](../commands/setDamage.md) · [setHitPointDamage](../commands/setHitPointDamage.md)

<sub>Source: [BI Community Wiki — BIS fnc moduleDamage](https://community.bistudio.com/wiki/BIS_fnc_moduleDamage) (revision 352163).</sub>
