---
name: "BIS_fnc_setVehicleMass"
type: function
status: ok
groups: ["Object Manipulation"]
arma3_since: "1.00"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_setVehicleMass
revid: 327965
updated: 2022-07-13T13:59:07Z
---

# BIS_fnc_setVehicleMass

*Function · Object Manipulation · Arma 3 v1.00*

Locality: arguments **local** · effect **global**

## Description

Set mass relative to the default vehicle mass (default mass being vehicle mass on first execution of this function).

## Syntax

```sqf
[vehicle, animationInformation, massDifference] call BIS_fnc_setVehicleMass
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md)
- `animationInformation`: [Boolean](../topics/Boolean.md) or [Array](../topics/Array.md) - (Optional, default `[]`)
  - [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to take current animations mass in consideration, [false](../commands/false.md) to set "raw" mass
  - [Array](../topics/Array.md) - animation sources and phases to format ["animationSource1", 1, "animationSource2", 0, ...]
- `massDifference`: [Number](../topics/Number.md) - (Optional, default 0) value to add to the mass (can be negative)

**Returns:** [Boolean](../topics/Boolean.md) - success state

## Examples

### Example 1

```sqf
// default behaviour, change the mass according to the current phase of the animation sources
result = [this]            call BIS_fnc_setVehicleMass;
result = [this, [], 0]    call BIS_fnc_setVehicleMass;
```

### Example 2

```sqf
// doesn't care about the current phase of animations, it will change the mass for the given sources
result = [this, ["source1", 1, "source2", 0]] call BIS_fnc_initVehicle;
```

### Example 3

```sqf
// will do the same as the first example, then subtract 150 to the mass
result = [this, [], -150] call BIS_fnc_initVehicle;
```

## See also

[setMass](../commands/setMass.md) · [setCenterOfMass](../commands/setCenterOfMass.md)

<sub>Source: [BI Community Wiki — BIS fnc setVehicleMass](https://community.bistudio.com/wiki/BIS_fnc_setVehicleMass) (revision 327965).</sub>
