---
name: "local"
type: command
status: ok
groups: ["Multiplayer"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/local
revid: 349662
updated: 2023-11-18T17:02:32Z
---

# local

*Command · Multiplayer · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: arguments **global**

## Description

Check if given unit is local on the computer in multiplayer games - see [Multiplayer Scripting#Locality](../topics/Multiplayer_Scripting.md#locality).

This can be used to determine on which computer some code must be run. In single player all objects are local.

## Syntax

### Syntax 1

```sqf
local object
```

**Parameters:**

- `object`: [Object](../topics/Object.md) or [Group](../topics/Group.md) (since Arma 3 v1.32)

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

### Syntax 2

*since arma2 1.00*

```sqf
local variable = value From Arma 2 v1.00 until Arma 3 v1.54 - see private for later versions
```

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

## Examples

### Example 1

```sqf
if (not local _unit) then
{
    hint format ["%1 is remote", name _unit];
};
```

### Example 2

```sqf
_isLocalGroup = local group _unit;
```

### Example 3

Sets variable's [scope](../topics/Variables.md#scopes):

```sqf
// from Arma 2 v1.00 until Arma 3v1.54
local _myVariable = 42;

// since Arma 3 v1.54
private _myVariable = 42;
```

## Multiplayer

A few things to note [amongst others](../topics/Multiplayer_Scripting.md#general-information-about-locality):
- A game logic / module is always local to the server
- Terrain objects are local to every machine

## See also

[Arma 3: Event Handlers](../topics/Event_Handlers.md) · [owner](../commands/owner.md) · [setOwner](../commands/setOwner.md)

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