# Triggering Experience Gained
Grammar — Triggering experience gained
Flags —Native
|Function
Returns the triggering experience gained. Used in response to “Unit Gains Experience”.
Returns — fixed
native fixed EventUnitXPDelta();
# Supported triggers
- Unit Gains Experience — TriggerAddEventUnitGainExperience
# Related
Category: Unit / Attributes And Experience
- Unit Gains Experience —
void
— TriggerAddEventUnitGainExperience - Unit Gains Experience Level —
void
— TriggerAddEventUnitGainLevel - Unit XP Get Current XP —
fixed
— UnitXPGetCurrentXP - Unit XP Add XP —
void
— UnitXPAddXP - Unit XP Set Current XP —
void
— UnitXPSetCurrentXP - Unit XP Get XP For Level —
int
— UnitXPGetXPForLevel - Unit XP Set XP For Level —
void
— UnitXPSetXPForLevel - Unit XP Get Current Level —
int
— UnitXPGetCurrentLevel - Unit XP Set Current Level —
void
— UnitXPSetCurrentLevel - Unit XP Get Num Levels —
int
— UnitXPGetNumLevels - Triggering Experience Gained —
fixed
— EventUnitXPDelta - Unit Attribute Change —
void
— TriggerAddEventUnitAttributeChange - Triggering Attribute Points —
int
— EventUnitAttributePoints - Total Experience Of Unit —
fixed
— UnitXPTotal - Experience Level Of Unit —
int
— UnitLevel - Enable/Disable Experience Gain For Unit —
void
— UnitXPGainEnable
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:13590
if (auto147025F9_var == null) { break; }
if ((UnitGetType(auto147025F9_var) != "HeroLostVikingsController")) {
UnitXPAddXP(auto147025F9_var, null, EventUnitXPDelta());
}
mods/heromods/dva.stormmod — base.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);
}