---
name: "allObjects"
type: command
status: ok
groups: ["Object Detection"]
arma3_since: "2.10"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/allObjects
revid: 377077
updated: 2026-01-01T09:39:24Z
---

# allObjects

*Command · Object Detection · Arma 3 v2.10*

## Description

Returns array of requested objects as fast as the engine allows it. The objects can be requested by object type and simulation kind.

> [!NOTE]
> This command does not return terrain placed objects (except for terrain objects with lights, such as lamp posts, etc. which can be found in the slow entities collection). To get all terrain objects, use [nearestTerrainObjects](../commands/nearestTerrainObjects.md) instead.

## Syntax

### Syntax 1

```sqf
objectType allObjects objectCollection
```

**Parameters:**

- `objectType`: [Number](../topics/Number.md) - type can be a combination of types according to bit flag operation (see [getObjectType](../commands/getObjectType.md)):
  - -1 - Arma 3 v2.12 All types incl. nulls (nulls exist with 'objectCollection' 7 and 8)
  - 1 - Primary - normal object placed in Terrain Builder, part of landscape
  - 2 - Network - road placed in Terrain Builder, part of landscape
  - 4 - Temporary - temporary object (like vehicle tracks)
  - 8 - TypeVehicle - entity added by game
  - 16 - TypeTempVehicle - temporary entity
  - 32 - LandDecal - land decal
  For example if required objects are both TerrainBuilder-placed (**1**) and dynamically placed (**8**) the combination type will be  8 + 1 = **9**

  > [!NOTE]
  > Use **63** (1 + 2 + 4 + 8 + 16 + 32) to return objects of all types (excl. nulls).
- `objectCollection`: [Number](../topics/Number.md) - supported values:
  - 0 - Slow (and very slow) entities: some houses, rubbles, street lamps, churches, etc
  - 1 - Normal entities: vehicles etc
  - 2 - Fast entities: shots and other high precision entities
  - 3 - Cloudlets: smokes, dust, etc
  - 4 - Out vehicles: objects that are not listed anywhere else, holders, etc
  - 5 - Animals: animals, birds, insects, etc
  - 6 - Mines: mines
  - 7 - Arma 3 v2.12 Sensor map: ordered triggers. When trigger is created it is added to this collection in the order of creation. When deleted it becomes null. Use 'objectType' -1 to include nulls
  - 8 - Arma 3 v2.12 Vehicle map: ordered vehicles. When vehicle is created it is added to this collection in the order of creation. When deleted it becomes null. Use 'objectType' -1 to include nulls
  - 9 - Arma 3 v2.18 Vehicles and [crew](../commands/crew.md): normal entities as in 1 as well as crew if an entity is a vehcile with crew.
  - 10 - Arma 3 v2.22 Windlets: all objects of the type '#windlet'.
  - 11 - Arma 3 v2.22 Active windlets: all objects of the type '#windlet' which are enabled.

**Returns:** [Array](../topics/Array.md) of [Object](../topics/Object.md)s

### Syntax 2

*since arma3 2.12*

```sqf
objectType allObjects objectCollection
```

**Parameters:**

- `objectType`: [String](../topics/String.md) - type of the objects (will exact match return of [typeOf](../commands/typeOf.md))
- `objectCollection`: [Number](../topics/Number.md) - see main syntax above

**Returns:** [Array](../topics/Array.md) of [Object](../topics/Object.md)s

## Examples

### Example 1

```sqf
private _visitorBuildings = 1 allObjects 0;
```

### Example 2

```sqf
private _userPlacedBuildings = 8 allObjects 0;
```

### Example 3

```sqf
onEachFrame
{
    hintSilent str
    [
        count (63 allObjects 0),
        count (63 allObjects 1),
        count (63 allObjects 2),
        count (63 allObjects 3),
        count (63 allObjects 4),
        count (63 allObjects 5),
        count (63 allObjects 6)
    ];
};
```

### Example 4

```sqf
private _allGroundWeaponHolders = "GroundWeaponHolder" allObjects 0;
private _allSimulatedWeaponHolders = "WeaponHolderSimulated" allObjects 1;
```

## See also

[getObjectFOV](../commands/getObjectFOV.md) · [cursorObject](../commands/cursorObject.md) · [cursorTarget](../commands/cursorTarget.md) · [createSimpleObject](../commands/createSimpleObject.md) · [allMissionObjects](../commands/allMissionObjects.md) · [setObjectViewDistance](../commands/setObjectViewDistance.md) · [getObjectViewDistance](../commands/getObjectViewDistance.md) · [objectParent](../commands/objectParent.md) · object · [getObjectType](../commands/getObjectType.md) · [allPlayers](../commands/allPlayers.md) · [allGroups](../commands/allGroups.md) · [allDead](../commands/allDead.md) · [playableUnits](../commands/playableUnits.md) · [switchableUnits](../commands/switchableUnits.md) · [units](../commands/units.md) · [vehicles](../commands/vehicles.md) · [allUnitsUAV](../commands/allUnitsUAV.md) · [allCurators](../commands/allCurators.md) · [playersNumber](../commands/playersNumber.md)

## Community notes

**PierreMGI** — 2022-11-30

This command (`63 allObjects 0`) will return lamps or poles but not houses. Use [nearestTerrainObjects](../commands/nearestTerrainObjects.md) instead.

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