# Triggering Unit Kill XP

Grammar — Triggering Unit Kill XP
FlagsNative | Function

Returns the kill XP value of the triggering unit.

Returns — int

native int EventUnitDamageKillXP();

# Supported triggers

Category: Unit / Combat

# Examples

mods/heroes.stormmodbase.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.stormmapMapScript.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.stormmodbase.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.stormmodbase.stormdata/LibPVEM.galaxy:2427

    }

    libPVEM_gf_AwardXPForNPCKill(EventUnit(), UnitGetOwner(EventUnit()), libGame_ge_XPSources_Minion, libNtve_gf_KillingPlayer(), EventUnitDamageKillXP());
    return true;
}

mods/heroesdata.stormmodbase.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.stormmodbase.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.stormmodbase.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;