{"name":"inAreaArray","title":"inAreaArray","type":"command","url":"https://community.bistudio.com/wiki/inAreaArray","revid":378040,"updated":"2026-01-27T13:05:40Z","groups":["Triggers","Markers","Locations","Positions"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Returns given list of Objects and/or Positions that are in the given area, area defined by a trigger, marker, location or array.\n\n> [!IMPORTANT]\n> By default all positions given as Array or as objects are treated as PositionAGL. Since Arma 3 v2.20 there is an option to force them to PositionWorld format.","syntaxes":[{"syntax":"positions inAreaArray area","params":[{"name":"positions","type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},{"name":"area","type":"Object, Location or String","description":"the defined area:\n\n- Object - trigger\n- Location - location\n- String - marker name","type_expr":"Object | Location | String"}],"returns":{"type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},"form":"binary","left":{"text":"positions"},"right":{"text":"area"}},{"syntax":"positions inAreaArray [centre, a, b, angle, isRectangle, c, usePosWorld]","params":[{"name":"positions","type":"Array of Objects and/or Positions","description":"Places to check. Positions must be PositionAGL if area is checked in 3D (see note in description)","type_expr":"Array<Object | Position>"},{"name":"centre","type":"Position2D, PositionAGL, Arma 3 v2.14 Object or Group","type_expr":"Position2D | PositionAGL | Object | Group"},{"name":"a","type":"Number","description":"x axis (x / 2)","type_expr":"Number"},{"name":"b","type":"Number","description":"y axis (y / 2)","type_expr":"Number"},{"name":"angle","type":"Number","optional":true,"default":"0","description":"rotation angle","type_expr":"Number","text":"angle: Number - (Optional, default 0) rotation angle"},{"name":"isRectangle","type":"Boolean","optional":true,"default":"false","description":"true if rectangle, false if ellipse","type_expr":"Boolean","text":"isRectangle: Boolean - (Optional, default false) true if rectangle, false if ellipse"},{"name":"c","type":"Number","optional":true,"default":"-1: unlimited","description":"z axis (z / 2)","type_expr":"Number","text":"c: Number - (Optional, default -1: unlimited) z axis (z / 2)"},{"name":"usePosWorld","type":"Boolean","optional":true,"default":"false","description":"set to true to treat all positions as PositionWorld","type_expr":"Boolean","since":"arma3 2.20","text":"usePosWorld: Boolean - (Optional, default false) set to true to treat all positions as PositionWorld"}],"returns":{"type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},"form":"binary","left":{"text":"positions"},"right":{"text":"[centre, a, b, angle, isRectangle, c, usePosWorld]"}},{"syntax":"positions inAreaArray [pos1, pos2, pos3,...]","since":"arma3 2.20","params":[{"name":"positions","type":"Array of Objects and/or Positions","description":"places to check.","type_expr":"Array<Object | Position>"},{"name":"posN","type":"Position","description":"polygon vertices in 2d or 3d format (see inPolygon)","type_expr":"Position"}],"returns":{"type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},"form":"binary","left":{"text":"positions"},"right":{"text":"[pos1, pos2, pos3,...]"}}],"examples":[{"code":["vehicles inAreaArray myTrigger;"]},{"code":["allUnits inAreaArray \"myMarker\";"]},{"code":["allPlayers inAreaArray myLocation;"]},{"code":["allDead inAreaArray [[100, 100, 0], 20, 30, 45, false, 10];"]}],"see_also":["inAreaArrayIndexes","inArea","triggerArea"],"notes":[{"user":"Tankbuster","date":"2017-06-11T21:33:00Z","text":"The array you send the command can be filtered. For example:\n\n```sqf\nvehicles select { _x isKindOf \"StaticWeapon\" } inAreaArray \"myMarker\"\n```\n\nWill return only the statics inside the given marker."}]}