---
name: "BIS_fnc_locations"
type: function
status: ok
groups: ["Systems"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_locations
revid: 348808
updated: 2023-11-08T14:38:16Z
---

# BIS_fnc_locations

*Function · Systems · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Creates or registers location logics (used in various modules, like Ambient Civilians, Ambient Civilian Vehicles or Warfare 2).

Upon registering, function will set following variables into location logic's variable space:
- "class" - unique class of location (either `BIS_loc_<configname>` or `BIS_loc_custom_<ID>`)
- "name" - name of location from config or [setName](../commands/setName.md) command. If none is defined, class is used
- "type" - config type
- "neighbors" - config defined neighbor locations

If you are registering currently existing object and some of variables above is already stored in it, it will **not** be replaced.

## Syntax

### Syntax 1

```sqf
[types, area, debug] call BIS_fnc_locations
```

**Parameters:**

- `types`: [String](../topics/String.md) or [Array](../topics/Array.md) of [String](../topics/String.md)s
- `area`: [Array](../topics/Array.md) in format [center, distance]
- `debug`: [Boolean](../topics/Boolean.md) (Optional)

**Returns:** [Array](../topics/Array.md) - list of registered locations

### Syntax 2

```sqf
[objects] call BIS_fnc_locations
```

**Parameters:**

- `objects`: Array of [Object](../topics/Object.md)s or [Location](../topics/Location.md)s - list of specific locations to be registered

**Returns:** [Array](../topics/Array.md) - list of registered locations

## Examples

### Example 1

```sqf
["CityCenter", [getPosATL player, 1000]] call BIS_fnc_locations;
```

### Example 2

```sqf
[["acityc_dolina"]] call BIS_fnc_locations;
```

### Example 3

```sqf
[[myLocation1, myLocation2], [], true] call BIS_fnc_locations;
```

## See also

Functions Library

## Community notes

**Str** — 2009-05-31

You can also use `"" call BIS_fnc_locations` for quick debug of all locations on landscape

<sub>Source: [BI Community Wiki — BIS fnc locations](https://community.bistudio.com/wiki/BIS_fnc_locations) (revision 348808).</sub>
