Arma 3 Scripting

allObjects

  • Arma 3 v2.10

Command · Markdown · JSON · original wiki page

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 instead.

Syntax

Syntax 1

objectType allObjects objectCollection

Parameters:

Returns: Array of Objects

Syntax 2

since arma3 2.12

objectType allObjects objectCollection

Parameters:

Returns: Array of Objects

Examples

Example 1

private _visitorBuildings = 1 allObjects 0;

Example 2

private _userPlacedBuildings = 8 allObjects 0;

Example 3

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

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

See also

getObjectFOV · cursorObject · cursorTarget · createSimpleObject · allMissionObjects · setObjectViewDistance · getObjectViewDistance · objectParent · object · getObjectType · allPlayers · allGroups · allDead · playableUnits · switchableUnits · units · vehicles · allUnitsUAV · allCurators · playersNumber

Community notes

PierreMGI

This command (63 allObjects 0) will return lamps or poles but not houses. Use nearestTerrainObjects instead.