---
name: "BIS_fnc_destroyer01HandleDamage"
type: function
status: ok
groups: ["Destroyer"]
arma3_since: "1.84"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_destroyer01HandleDamage
revid: 273884
updated: 2021-06-13T01:12:52Z
---

# BIS_fnc_destroyer01HandleDamage

*Function · Destroyer · Arma 3 v1.84*

## Description

- This is a damage visual FX simulation function designed to animate ships bridge windows when shot. Due to engine limitation (damage simulation is disabled for indestructible objects e.g. ships components) this workaround is applied.

## Syntax

```sqf
[] call BIS_fnc_destroyer01HandleDamage
```

**Parameters:**

- `mode` — 0: (Scalar)
- `param0` — 0: event Handler Array as documented here - https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart

**Returns:** nothing
Destroyer (ship) window textures are swapped for damaged ones. Simple swap.

## Examples

### Example 1

```sqf
class Eventhandlers
{
    HitPart = "_this call BIS_fnc_Destroyer01HandleDamage;";
};
```

## Function header

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

```sqf
/*
Author: Bravo Zero One development
- John_Spartan

Description:
- This is a damage visual FX simulation function designed to animate ships bridge windows when shot.
  Due to engine limitation (damage simulation is disabled for indestructible objects e.g. ships components) this workaround is applied.

Execution:
- Call from EH on the ship's model part with windows.

    Example:
    class Eventhandlers
    {
        HitPart = "_this call BIS_fnc_Destroyer01HandleDamage;";
    };

Requirements:
- Compatible object (e.g. ship component) must have a set of selections that are setup and named by convention.
  Selections must be defined as hidden selections in order for setObjectTexture to work.

Parameter(s):
    _this select 0: mode (Scalar)
    0: event Handler Array as documented here - https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart

Returns: nothing
Result: Destroyer (ship) window textures are swapped for damaged ones. Simple swap.
*/
```

<sub>Source: [BI Community Wiki — BIS fnc destroyer01HandleDamage](https://community.bistudio.com/wiki/BIS_fnc_destroyer01HandleDamage) (revision 273884).</sub>
