---
name: "setObjectMaterial"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/setObjectMaterial
revid: 370026
updated: 2024-10-27T23:18:53Z
---

# setObjectMaterial

*Command · Object Manipulation · Arma 3 v0.50*

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

## Description

Sets material of object selection. The selection number is defined through the hiddenselection[] = {} array in the vehicle's config (starting with 0).

## Syntax

```sqf
obj setObjectMaterial [selectionNumber, material]
```

**Parameters:**

- `obj`: [Object](../topics/Object.md)
- `selectionNumber`: [Number](../topics/Number.md) or [String](../topics/String.md) (since Arma 3 v2.10).
- `material`: [String](../topics/String.md) - material path. Since Arma 3 v2.20 using **"#reset"** would reset to default material.

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
car setObjectMaterial [0,"A3\Structures_F\Data\Windows\window_set.rvmat"];
car setObjectMaterial [1,"A3\Structures_F\Data\Windows\window_set.rvmat"];
```

## See also

[getObjectMaterials](../commands/getObjectMaterials.md) · [setObjectTextureGlobal](../commands/setObjectTextureGlobal.md) · [getObjectTextures](../commands/getObjectTextures.md) · [setObjectTexture](../commands/setObjectTexture.md) · [setObjectMaterialGlobal](../commands/setObjectMaterialGlobal.md)

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