# Triggering Unit Kill XP
Grammar — Triggering Unit Kill XP
Flags —Native
|Function
Returns the kill XP value of the triggering unit.
Returns — int
native int EventUnitDamageKillXP();
# Supported triggers
- Unit Takes Damage — TriggerAddEventUnitDamaged
# 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
mods/heroes.stormmod — base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:8636
if ((UnitTypeTestAttribute(UnitGetType(EventUnit()), c_unitAttributeMinion) == true) && (UnitGetOwner(EventUnit()) == libCore_gv_cOMPUTER_TeamChaos)) {
lv_xPGranted = libCore_gf_DataXPXPForMinion(EventUnitDamageKillXP(), libStEx_gv_pLAYER_01_USER, EventUnit());
libUIUI_gf_UIFloatingCombatTextH16MidXP(libStEx_gv_pLAYER_01_USER, EventUnit(), libCore_ge_FloatingTextType_XPSmall, FixedToInt(lv_xPGranted));
}
mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap — MapScript.galaxy:8636
if ((UnitTypeTestAttribute(UnitGetType(EventUnit()), c_unitAttributeMinion) == true) && (UnitGetOwner(EventUnit()) == libCore_gv_cOMPUTER_TeamChaos)) {
lv_xPGranted = libCore_gf_DataXPXPForMinion(EventUnitDamageKillXP(), libStEx_gv_pLAYER_01_USER, EventUnit());
libUIUI_gf_UIFloatingCombatTextH16MidXP(libStEx_gv_pLAYER_01_USER, EventUnit(), libCore_ge_FloatingTextType_XPSmall, FixedToInt(lv_xPGranted));
}
mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod — base.stormdata/LibPVEB.galaxy:2069
}
libPVEB_gf_AwardXPForNPCKill(EventUnit(), UnitGetOwner(EventUnit()), libGame_ge_XPSources_Minion, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
return true;
}
mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod — base.stormdata/LibPVEM.galaxy:2427
}
libPVEM_gf_AwardXPForNPCKill(EventUnit(), UnitGetOwner(EventUnit()), libGame_ge_XPSources_Minion, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
return true;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:18862
lv_unitType = UnitGetType(lv_unit);
if ((UnitTypeTestAttribute(lv_unitType, c_unitAttributeCreep) == true)) {
libGame_gf_CreepDies(lv_unit, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
return true;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:18871
if ((UnitTypeTestAttribute(lv_unitType, c_unitAttributeMinion) == true) && (UnitTestState(lv_unit, c_unitStateHallucination) == false) && (libGame_gv_minionSystemStarted == true)) {
libGame_gf_MinionDies(lv_unit, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
return true;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:18953
}
libGame_gf_AwardXPForNPCKill(lv_dyingStructureUnit, EventPlayer(), c_unitAttributeStructure, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
if ((UnitGetOwner(lv_dyingStructureUnit) == libCore_gv_cOMPUTER_TeamOrder)) {
lv_killingFaction = libGame_ge_Faction_Chaos;