{"name":"allDead","operator":null,"title":"allDead","type":"command","url":"https://community.bistudio.com/wiki/allDead","revid":377005,"updated":"2026-01-01T08:15:58Z","groups":["Object Detection"],"status":"ok","replaced_by":[],"games":[{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.57"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.57"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Return a list of all dead units including agents and destroyed vehicles. Dead units may be in vehicles.","syntaxes":[{"syntax":"allDead","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Array of Objects","types":["Array","Object"],"description":null,"text":"Array of Objects"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\n{ deleteVehicle _x } forEach allDead;\n```","code":["{ deleteVehicle _x } forEach allDead;"]},{"text":"allAlive:\n\n```sqf\n_all = allUnits + vehicles;\n{\n    _all pushBack agent _x;\n} forEach (agents - [teamMemberNull]);\nallAlive = _all - allDead;\n```","code":["_all = allUnits + vehicles;\n{\n\t_all pushBack agent _x;\n} forEach (agents - [teamMemberNull]);\nallAlive = _all - allDead;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["allDeadMen","allUnits","allGroups","playableUnits","switchableUnits","units","vehicles","allCurators"],"notes":[{"user":"Ebay","date":"2017-04-06T15:40:00Z","text":"This also returns bodies hidden with hideBody until they are deleted. Tested in A2OA 1.63.131129"}],"categories":["Arma 2: Operation Arrowhead: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Detection","Introduced with Arma 2: Operation Arrowhead version 1.57","Scripting Commands","Take On Helicopters: Scripting Commands"]}