---
name: "forceHitPointsDamageSync"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "2.18"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/forceHitPointsDamageSync
revid: 370215
updated: 2024-11-09T23:07:51Z
---

# forceHitPointsDamageSync

*Command · Object Manipulation · Arma 3 v2.18*

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

## Description

Synchronises hitpoints values and total damage across current network clients as well as JIP.
Possible uses after executing script commands such as [setHit](../commands/setHit.md), [setHitIndex](../commands/setHitIndex.md), [setHitPointDamage](../commands/setHitPointDamage.md) or in conjunction with [HandleDamage](../topics/Event_Handlers.md#handledamage) event handler (see [#Example 2](../commands/forceHitPointsDamageSync.md#example-2)).

## Syntax

```sqf
forceHitPointsDamageSync entity
```

**Parameters:**

- `entity`: [Object](../topics/Object.md) - entity

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if sync was attempted

## Examples

### Example 1

```sqf
forceHitPointsDamageSync house1;
```

### Example 2

```sqf
house1 addEventHandler ["HandleDamage", 
{
    if (isServer && { _this select 9 == 2 }) then { (_this select 0) spawn { forceHitPointsDamageSync _this; } };
    if (_this select 7 find "glass" >= 0) then { _this select 2 } else { 0 };
}];
```

## Multiplayer

Static buildings synchronisation should be executed on the [server](../commands/isServer.md) as the server is the authority in building damage and you would want every client in MP to have the same level of damage as the server has.

## See also

[getHit](../commands/getHit.md) · [getHitPointDamage](../commands/getHitPointDamage.md) · [setHitPointDamage](../commands/setHitPointDamage.md) · [damage](../commands/damage.md) · [setDamage](../commands/setDamage.md) · [setFuel](../commands/setFuel.md) · [setAmmo](../commands/setAmmo.md) · [getHitIndex](../commands/getHitIndex.md) · [setHitIndex](../commands/setHitIndex.md)

<sub>Source: [BI Community Wiki — forceHitPointsDamageSync](https://community.bistudio.com/wiki/forceHitPointsDamageSync) (revision 370215).</sub>
