---
name: "BIS_fnc_createRuin"
type: function
status: ok
groups: ["Environment"]
arma3_since: "1.76"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_createRuin
revid: 347313
updated: 2023-09-10T15:21:43Z
---

# BIS_fnc_createRuin

*Function · Environment · Arma 3 v1.76*

## Description

Create a building ruin and hide the original object.

## Syntax

```sqf
building call BIS_fnc_createRuin
```

**Parameters:**

- `building`: [Object](../topics/Object.md) - building to "destroy"

**Returns:** [Object](../topics/Object.md) - the created ruin

## Examples

### Example 1

```sqf
aBuilding call BIS_fnc_createRuin;
```

### Example 2

```sqf
// will destroy every building in a 50m radius around the player
private _nearBuildings = player nearObjects ["House", 50];
{ _x call BIS_fnc_createRuin } forEach _nearBuildings;
```

## See also

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

## Community notes

**Beno_83au** — 2019-06-01

In MP this function doesn't hide the building globally, so other clients will see both the original building *AND* the newly created ruined building - <https://feedback.bistudio.com/T140045>.
To get around this I've been hiding the object manually on all other clients:

```sqf
_building call BIS_fnc_createRuin;
[_building, true] remoteExecCall ["hideObject", -clientOwner];
```

This will run [hideObject](../commands/hideObject.md) on all other clients besides the client (or server) that this was executed from.

<sub>Source: [BI Community Wiki — BIS fnc createRuin](https://community.bistudio.com/wiki/BIS_fnc_createRuin) (revision 347313).</sub>
