{"name":"allObjects","operator":null,"title":"allObjects","type":"command","url":"https://community.bistudio.com/wiki/allObjects","revid":377077,"updated":"2026-01-01T09:39:24Z","groups":["Object Detection"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.10"}],"since":{"game":"arma3","name":"Arma 3","version":"2.10"},"arma3_since":"2.10","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns array of requested objects as fast as the engine allows it. The objects can be requested by object type and simulation kind.\n\n> [!NOTE]\n> 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.","syntaxes":[{"syntax":"objectType allObjects objectCollection","since":null,"effect":null,"exec":null,"params":[{"name":"objectType","type":"Number","optional":false,"default":null,"description":"type can be a combination of types according to bit flag operation (see getObjectType):\n- -1 - Arma 3 v2.12 All types incl. nulls (nulls exist with 'objectCollection' 7 and 8)\n- 1 - Primary - normal object placed in Terrain Builder, part of landscape\n- 2 - Network - road placed in Terrain Builder, part of landscape\n- 4 - Temporary - temporary object (like vehicle tracks)\n- 8 - TypeVehicle - entity added by game\n- 16 - TypeTempVehicle - temporary entity\n- 32 - LandDecal - land decal\nFor example if required objects are both TerrainBuilder-placed (**1**) and dynamically placed (**8**) the combination type will be  8 + 1 = **9**\n\n> [!NOTE]\n> Use **63** (1 + 2 + 4 + 8 + 16 + 32) to return objects of all types (excl. nulls).","types":["Number"],"since":null,"text":"objectType: Number - type can be a combination of types according to bit flag operation (see getObjectType):\n- -1 - Arma 3 v2.12 All types incl. nulls (nulls exist with 'objectCollection' 7 and 8)\n- 1 - Primary - normal object placed in Terrain Builder, part of landscape\n- 2 - Network - road placed in Terrain Builder, part of landscape\n- 4 - Temporary - temporary object (like vehicle tracks)\n- 8 - TypeVehicle - entity added by game\n- 16 - TypeTempVehicle - temporary entity\n- 32 - LandDecal - land decal\nFor example if required objects are both TerrainBuilder-placed (**1**) and dynamically placed (**8**) the combination type will be  8 + 1 = **9**\n\n> [!NOTE]\n> Use **63** (1 + 2 + 4 + 8 + 16 + 32) to return objects of all types (excl. nulls)."},{"name":"objectCollection","type":"Number","optional":false,"default":null,"description":"supported values:\n- 0 - Slow (and very slow) entities: some houses, rubbles, street lamps, churches, etc\n- 1 - Normal entities: vehicles etc\n- 2 - Fast entities: shots and other high precision entities\n- 3 - Cloudlets: smokes, dust, etc\n- 4 - Out vehicles: objects that are not listed anywhere else, holders, etc\n- 5 - Animals: animals, birds, insects, etc\n- 6 - Mines: mines\n- 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\n- 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\n- 9 - Arma 3 v2.18 Vehicles and crew: normal entities as in 1 as well as crew if an entity is a vehcile with crew.\n- 10 - Arma 3 v2.22 Windlets: all objects of the type '#windlet'.\n- 11 - Arma 3 v2.22 Active windlets: all objects of the type '#windlet' which are enabled.","types":["Number"],"since":null,"text":"objectCollection: Number - supported values:\n- 0 - Slow (and very slow) entities: some houses, rubbles, street lamps, churches, etc\n- 1 - Normal entities: vehicles etc\n- 2 - Fast entities: shots and other high precision entities\n- 3 - Cloudlets: smokes, dust, etc\n- 4 - Out vehicles: objects that are not listed anywhere else, holders, etc\n- 5 - Animals: animals, birds, insects, etc\n- 6 - Mines: mines\n- 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\n- 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\n- 9 - Arma 3 v2.18 Vehicles and crew: normal entities as in 1 as well as crew if an entity is a vehcile with crew.\n- 10 - Arma 3 v2.22 Windlets: all objects of the type '#windlet'.\n- 11 - Arma 3 v2.22 Active windlets: all objects of the type '#windlet' which are enabled."}],"returns":{"type":"Array of Objects","types":["Array","Object"],"description":null,"text":"Array of Objects"},"form":"binary","operator":null,"left":{"text":"objectType","types":["Number"]},"right":{"text":"objectCollection","types":["Number"]}},{"syntax":"objectType allObjects objectCollection","since":"arma3 2.12","effect":null,"exec":null,"params":[{"name":"objectType","type":"String","optional":false,"default":null,"description":"type of the objects (will exact match return of typeOf)","types":["String"],"since":null,"text":"objectType: String - type of the objects (will exact match return of typeOf)"},{"name":"objectCollection","type":"Number","optional":false,"default":null,"description":"see main syntax above","types":["Number"],"since":null,"text":"objectCollection: Number - see main syntax above"}],"returns":{"type":"Array of Objects","types":["Array","Object"],"description":null,"text":"Array of Objects"},"form":"binary","operator":null,"left":{"text":"objectType","types":["String"]},"right":{"text":"objectCollection","types":["Number"]}}],"examples":[{"text":"```sqf\nprivate _visitorBuildings = 1 allObjects 0;\n```","code":["private _visitorBuildings = 1 allObjects 0;"]},{"text":"```sqf\nprivate _userPlacedBuildings = 8 allObjects 0;\n```","code":["private _userPlacedBuildings = 8 allObjects 0;"]},{"text":"```sqf\nonEachFrame\n{\n    hintSilent str\n    [\n        count (63 allObjects 0),\n        count (63 allObjects 1),\n        count (63 allObjects 2),\n        count (63 allObjects 3),\n        count (63 allObjects 4),\n        count (63 allObjects 5),\n        count (63 allObjects 6)\n    ];\n};\n```","code":["onEachFrame\n{\n\thintSilent str\n\t[\n\t\tcount (63 allObjects 0),\n\t\tcount (63 allObjects 1),\n\t\tcount (63 allObjects 2),\n\t\tcount (63 allObjects 3),\n\t\tcount (63 allObjects 4),\n\t\tcount (63 allObjects 5),\n\t\tcount (63 allObjects 6)\n\t];\n};"]},{"text":"```sqf\nprivate _allGroundWeaponHolders = \"GroundWeaponHolder\" allObjects 0;\nprivate _allSimulatedWeaponHolders = \"WeaponHolderSimulated\" allObjects 1;\n```","code":["private _allGroundWeaponHolders = \"GroundWeaponHolder\" allObjects 0;\nprivate _allSimulatedWeaponHolders = \"WeaponHolderSimulated\" allObjects 1;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getObjectFOV","cursorObject","cursorTarget","createSimpleObject","allMissionObjects","setObjectViewDistance","getObjectViewDistance","objectParent","object","getObjectType","allPlayers","allGroups","allDead","playableUnits","switchableUnits","units","vehicles","allUnitsUAV","allCurators","playersNumber"],"notes":[{"user":"PierreMGI","date":"2022-11-30T17:32:09Z","text":"This command (`63 allObjects 0`) will return lamps or poles but not houses. Use nearestTerrainObjects instead."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Detection","Introduced with Arma 3 version 2.10","Scripting Commands"]}