# Unit XP Add XP
Grammar — Adds xP xp to veterancyBehavior for unit
Flags —Native
|Action
Adds XP to the current unit
# Arguments
unit
— Unitstring
[ gamelink::Behavior ] — Veterancy Behaviorfixed
— XP
Returns — void
native void UnitXPAddXP(
unit inUnit,
string inVeterancyBehavior,
fixed inXP,
);
# Related
Category: Unit / Attributes And Experience
- [F] —
void
— Unit Gains Experience — ( TriggerAddEventUnitGainExperience ) - [F] —
void
— Unit Gains Experience Level — ( TriggerAddEventUnitGainLevel ) - [F] —
fixed
— Unit XP Get Current XP — ( UnitXPGetCurrentXP ) - [F] —
void
— Unit XP Add XP — ( UnitXPAddXP ) - [F] —
void
— Unit XP Set Current XP — ( UnitXPSetCurrentXP ) - [F] —
int
— Unit XP Get XP For Level — ( UnitXPGetXPForLevel ) - [F] —
void
— Unit XP Set XP For Level — ( UnitXPSetXPForLevel ) - [F] —
int
— Unit XP Get Current Level — ( UnitXPGetCurrentLevel ) - [F] —
void
— Unit XP Set Current Level — ( UnitXPSetCurrentLevel ) - [F] —
int
— Unit XP Get Num Levels — ( UnitXPGetNumLevels ) - [F] —
fixed
— Triggering Experience Gained — ( EventUnitXPDelta ) - [F] —
void
— Unit Attribute Change — ( TriggerAddEventUnitAttributeChange ) - [F] —
int
— Triggering Attribute Points — ( EventUnitAttributePoints ) - [F] —
fixed
— Total Experience Of Unit — ( UnitXPTotal ) - [F] —
int
— Experience Level Of Unit — ( UnitLevel ) - [F] —
void
— Enable/Disable Experience Gain For Unit — ( UnitXPGainEnable )
# Examples
# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod
// L2584
UnitXPAddXP(libPEB1_gv_archangelAreas[lp_areaIndex].lv_archangelUnit, "TerranArchangelDefenderScaling", (lp_level - 1))
// L7409
UnitXPAddXP(libPEB1_gv_archangelAreas[auto565EB0CF_var].lv_archangelUnit, "TerranArchangelDefenderScaling", 1.0)
# mods/heroesdata.stormmod
// L5192
UnitXPAddXP(lv_ultimateEvolutionUnit, null, libCore_gf_GetTotalXPForLevel(lv_abathurLevel))
// L13590
UnitXPAddXP(auto147025F9_var, null, EventUnitXPDelta())
# mods/heroesdata.stormmod
// L9407
UnitXPAddXP(libMapM_gv_jungleCreepCamps[lv_camp].lv_campOwnershipFlagUnit, null, lp_killXP)
// L10358
UnitXPAddXP(lv_heroUnit, null, lv_xP)
// L11069
UnitXPAddXP(lp_unit, null, lv_xPToApply)
# mods/heroesdata.stormmod
// L4294
UnitXPAddXP(EventUnitCreatedUnit(), null, libGame_gv_scalingTicks)
# mods/heroesmapmods/battlegroundmapmods/braxisholdout.stormmod
// L1583
UnitXPAddXP(UnitLastCreated(), null, libSCHO_gv_mMHO_ScalingLevel)
// L2006
UnitXPAddXP(lv_itUnit, null, libSCHO_gv_mMHO_ScalingLevel)
// L2014
UnitXPAddXP(lv_itUnit, null, libSCHO_gv_mMHO_ScalingLevel)
// L2117
UnitXPAddXP(UnitLastCreated(), null, libSCHO_gv_mMHO_ScalingLevel)
// L2518
UnitXPAddXP(UnitLastCreated(), null, libSCHO_gv_mMHO_ScalingLevel)
// L2523
UnitXPAddXP(UnitLastCreated(), null, libSCHO_gv_mMHO_ScalingLevel)
// L2888
UnitXPAddXP(auto8529E143_var, null, 1.0)
// L2895
UnitXPAddXP(auto6DDA816B_var, null, 1.0)
// L2902
UnitXPAddXP(auto17CDE435_var, null, 1.0)
// L2909
UnitXPAddXP(auto23E8D062_var, null, 1.0)
# mods/heroesmapmods/battlegroundmapmods/hanamura.stormmod
// L922
UnitXPAddXP(EventUnitCreatedUnit(), "OverwatchTurretPlayerScaling", libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(UnitGetOwner(EventUnit()))].lv_teamLevel)
# mods/heroesmapmods/battlegroundmapmods/infernalshrines.stormmod
// L613
UnitXPAddXP(UnitLastCreated(), null, libMSHE_gv_mMISMonsterXP)
// L1370
UnitXPAddXP(EventUnitCreatedUnit(), null, libMSHE_gv_mMISMonsterXP)
# mods/heroesmapmods/battlegroundmapmods/overwatchdata.stormmod
// L520
UnitXPAddXP(EventUnitCreatedUnit(), "BioticEmitterScaling", libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(UnitGetOwner(EventUnit()))].lv_teamLevel)
// L631
UnitXPAddXP(EventUnitCreatedUnit(), "OverwatchTurretPlayerScaling", libGame_gv_teams[libGame_gf_TeamNumberOfPlayer(UnitGetOwner(EventUnit()))].lv_teamLevel)
# mods/heroesmapmods/battlegroundmapmods/starcraft.stormmod
// L438
UnitXPAddXP(EventUnitCreatedUnit(), null, lib566061C9_gv_mMSC_ScalingXP)
# mods/heromods/dva.stormmod
// L1854
UnitXPAddXP(lv_dVaPilot, null, EventUnitXPDelta())
# mods/heromods/samuro.stormmod
// L998
UnitXPAddXP(lv_mirrorImage, null, libCore_gf_GetTotalXPForLevel(lv_samuroLevel))
# mods/starcoop/starcoop.sc2mod
// L17697
UnitXPAddXP(lv_collectorUnit, libCOMI_gv_cM_DehakaVeterencyBehavior[lv_player], lv_essenceCountStored)
// L22173
UnitXPAddXP(auto9DCFEB60_var, null, lv_xp)