# Unit XP Get Current XP

Grammar — The current xp in veterancyBehavior for unit
FlagsNative | Function

Returns the current xp of a unit

# Arguments

  • unit — Unit
  • string [ gamelink::Behavior ] — Veterancy Behavior

Returns — fixed

native fixed UnitXPGetCurrentXP(
	unit inUnit,
	string inVeterancyBehavior,
);

Category: Unit / Attributes And Experience

# Examples

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L2095
UnitXPGetCurrentXP(libGame_gv_players[UnitGetOwner(lp_deadHero)].lv_heroUnit, "HeroDummyVeterancy")
// L2111
UnitXPGetCurrentXP(libGame_gv_players[UnitGetOwner(lp_playerHero)].lv_heroUnit, "HeroDummyVeterancy")

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L1758
UnitXPGetCurrentXP(libMapM_gv_jungleCreepCamps[lp_camp].lv_campOwnershipFlagUnit, null)