# Triggering Death Type Check
Grammar — Triggering death type is deathType|Type
Flags —Native
|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
int
<preset::DeathType> — Death Type
Returns — bool
native bool EventUnitDamageDeathCheck(int inType);
# Supported triggers
- Unit Dies — TriggerAddEventUnitDied
# Related
Category: Unit / Combat
- Get Unit Damage Dealt Time —
fixed
— UnitGetDamageDealtTime - Get Unit Damage Taken Time —
fixed
— UnitGetDamageTakenTime - Weapon Used In Attack —
string
<gamelink::Weapon> — EventUnitGetWeapon - Item Used In Attack —
unit
— EventUnitGetItem - Item Type Used In Attack —
string
<gamelink::Item> — EventUnitGetItemType - Unit Dies —
void
— TriggerAddEventUnitDied - Killing Unit —
unit
— libNtve_gf_KillingUnit - Killing Player —
int
— libNtve_gf_KillingPlayer - Triggering Death Type Check —
bool
— EventUnitDamageDeathCheck - Unit Is Being Removed —
void
— TriggerAddEventUnitRemoved - Unit Starts Attacking (Deprecated) —
void
— TriggerAddEventUnitStartedAttack - Unit Starts Attacking —
void
— TriggerAddEventUnitStartedAttack2 - Unit Is Attacked (Deprecated) —
void
— TriggerAddEventUnitAttacked - Unit Is Attacked —
void
— TriggerAddEventUnitAttacked2 - Attacking Unit —
unit
— EventUnitTarget - Unit Absorbs Damage —
void
— TriggerAddEventUnitDamageAbsorbed - Unit Takes Damage —
void
— TriggerAddEventUnitDamaged - Damaging Unit —
unit
— EventUnitDamageSourceUnit - Damaging Player —
int
— EventUnitDamageSourcePlayer - Damaging Effect —
string
<gamelink::Effect> — EventUnitDamageEffect - Triggering Damage Taken —
fixed
— EventUnitDamageAmount - Triggering Damage Attempted —
fixed
— EventUnitDamageAttempted - Triggering Damage Attempted Vitals —
fixed
— EventUnitDamageAttemptedVitals - Triggering Damage Absorbed —
fixed
— EventUnitDamageAbsorbed - Triggering Damage Behavior Shield —
fixed
— EventUnitDamageBehaviorShield - Triggering Vitals Leeched —
fixed
— EventUnitDamageVitalsLeeched - Triggering Unit Kill XP —
int
— EventUnitDamageKillXP - Damage Source Position —
point
— EventUnitDamageSourcePoint - Unit is Healed —
void
— TriggerAddEventUnitHealed - Healing Unit —
unit
— EventUnitHealLaunchUnit - Healing Player —
int
— EventUnitHealLaunchPlayer - Triggering Heal Vital Type —
int
<preset::UnitVitalType> — EventUnitHealVital - Triggering Heal Given —
fixed
— EventUnitHealAmount - Healing Effect —
string
<gamelink::Effect> — EventUnitHealEffect - Unit Spends Vital —
void
— TriggerAddEventUnitSpendVital - Triggering Spent Vital Type —
int
<preset::UnitVitalType> — EventUnitSpentVitalVital - Triggering Vital Spent —
fixed
— EventUnitSpentVitalAmount - Unit Acquires Target —
void
— TriggerAddEventUnitAcquiredTarget - Acquired Target —
unit
— libNtve_gf_AcquiredTarget - Unit Is Revived —
void
— TriggerAddEventUnitRevive - Triggering Victim Unit —
unit
— EventUnitVictimUnit - Triggering Item Used —
unit
— EventUnitItemUsed - Triggering Effect Used —
string
<gamelink::Effect> — EventUnitEffectUsed
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:598
}
if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageDeathCheck(c_deathTypeCancel) == true)) {
return true;
}
campaigns/liberty.sc2campaign — base.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.sc2map — MapScript.galaxy:598
}
if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageDeathCheck(c_deathTypeCancel) == true)) {
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/rushdefense.sc2map — MapScript.galaxy:946
}
if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageDeathCheck(c_deathTypeCancel) == true)) {
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:13374
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:13464
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:13524
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:13600
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:13685
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:15236
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:17597
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:19912
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:19916
}
if (!((EventUnitDamageDeathCheck(c_deathTypeTimeout) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:22134
}
if (!((EventUnitDamageDeathCheck(c_deathTypeRemove) == false))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:10588
}
if ((EventUnitDamageDeathCheck(c_deathTypeRemove) == true)) {
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:10597
}
if ((EventUnitDamageDeathCheck(c_deathTypeTimeout) == false)) {
libCOMU_gf_CT_ApplySpawnBroodling(EventUnit());
libCOMU_gf_CT_ApplySpawnInfested(EventUnit());
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:7726
}
if (!((EventUnitDamageDeathCheck(c_deathTypeEat) == true))) {
return false;
}