# Triggering Death Type Check

Grammar — Triggering death type is deathType|Type
FlagsNative | Function

Returns true if a unit is dying from a given type/cause of death. Use this in response to a “Unit Dies” event.

# Arguments

Returns — bool

native bool EventUnitDamageDeathCheck(int inType);

# Supported triggers

Category: Unit / Combat

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:598

    }

    if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageDeathCheck(c_deathTypeCancel) == true)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:946

    }

    if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageDeathCheck(c_deathTypeCancel) == true)) {
        return true;
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/rushdefense.sc2mapMapScript.galaxy:598

    }

    if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageDeathCheck(c_deathTypeCancel) == true)) {
        return true;
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/rushdefense.sc2mapMapScript.galaxy:946

    }

    if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageDeathCheck(c_deathTypeCancel) == true)) {
        return true;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:13374

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:13464

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:13524

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:13600

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:13685

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:15236

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17597

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:19912

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:19916

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeTimeout) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:22134

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:10588

    }

    if ((EventUnitDamageDeathCheck(c_deathTypeRemove) == true)) {
        return true;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:10597

    }

    if ((EventUnitDamageDeathCheck(c_deathTypeTimeout) == false)) {
        libCOMU_gf_CT_ApplySpawnBroodling(EventUnit());
        libCOMU_gf_CT_ApplySpawnInfested(EventUnit());

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:7726

        }

        if (!((EventUnitDamageDeathCheck(c_deathTypeEat) == true))) {
            return false;
        }