---
name: "BIS_fnc_objectVar"
type: function
status: ok
groups: ["Object Manipulation"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_objectVar
revid: 328361
updated: 2022-07-13T16:00:47Z
---

# BIS_fnc_objectVar

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

## Description

Return a unique object variable. The variable is preserved after unit respawn.

## Syntax

```sqf
[object, varNameRoot] call BIS_fnc_objectVar
```

**Parameters:**

- `object`: [Object](../topics/Object.md)
- `varNameRoot`: [String](../topics/String.md) - (Optional, default "bis_o") - variable name root - a number will be added behind it

**Returns:** [String](../topics/String.md) - generated variable name

## Examples

### Example 1

```sqf
hint str (player call BIS_fnc_objectVar); // "bis_o1"
hint str (player == (missionNamespace getVariable "bis_o1")); // true
```

## See also

[netId](../commands/netId.md) · [objectFromNetId](../commands/objectFromNetId.md) · [setVariable](../commands/setVariable.md) · [setVehicleVarName](../commands/setVehicleVarName.md)

<sub>Source: [BI Community Wiki — BIS fnc objectVar](https://community.bistudio.com/wiki/BIS_fnc_objectVar) (revision 328361).</sub>
