Arma 3 Scripting

allDeadMen

  • Arma 3 v0.50

Command · Markdown · JSON · original wiki page

Description

Return a list of dead units including agents. Dead unit might be inside vehicle.

Syntax

allDeadMen

Returns: Array of Objects

Examples

Example 1

{ deleteVehicle _x } forEach allDeadMen;

See also

allDead · allUnits · allGroups · playableUnits · switchableUnits · units · vehicles · allCurators · getCorpse

Community notes

Pierre MGI

As dead men are civilian side, don't try to count them with { side _x isEqualTo east } count allDeadMen; result will always be 0.

Use the configfile "side" instead:

0 spawn
{
    while { true } do
    {
        sleep 0.1;
        _westScore =
        {
            getNumber (configFile >> "CfgVehicles" >> typeOf _x >> "side") == 0
        } count allDeadMen;
        hintSilent format ["East killed: %1", _westScore];
    };
};