# Unit XP Set Current XP

Grammar — Sets the current xp in veterancyBehavior for unit to xP
FlagsNative | Action

Sets the current xp of a unit

# Arguments

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

Returns — void

native void UnitXPSetCurrentXP(
	unit inUnit,
	string inVeterancyBehavior,
	fixed inXP,
);

Category: Unit / Attributes And Experience

# Examples

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L1791
UnitXPSetCurrentXP(libMapM_gv_jungleCreepCamps[lp_camp].lv_campOwnershipFlagUnit, null, 0.0)

# mods/heroesdata.stormmod

SupportLib.galaxy

// L4696
UnitXPSetCurrentXP(libGame_gv_players[lv_iterPlayer].lv_heroUnit, "HeroDummyVeterancy", lv_highestXP)