# Triggering Experience Gained

Grammar — Triggering experience gained
FlagsNative | Function

Returns the triggering experience gained. Used in response to “Unit Gains Experience”.

Returns — fixed

native fixed EventUnitXPDelta();

# Supported triggers

Category: Unit / Attributes And Experience

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:13590

        if (auto147025F9_var == null) { break; }
        if ((UnitGetType(auto147025F9_var) != "HeroLostVikingsController")) {
            UnitXPAddXP(auto147025F9_var, null, EventUnitXPDelta());
        }

mods/heromods/dva.stormmodbase.stormdata/LibHDVA.galaxy:1854

    lv_pilotXP = UnitXPTotal(lv_dVaPilot);
    if ((lv_mechXP > lv_pilotXP)) {
        UnitXPAddXP(lv_dVaPilot, null, EventUnitXPDelta());
        TriggerDebugOutput(1, StringExternal("Param/Value/lib_HDVA_B161F94A"), true);
    }