# Unit XP Set Current Level

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

Sets the current level of a unit

# Arguments

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

Returns — void

native void UnitXPSetCurrentLevel(
	unit inUnit,
	string inVeterancyBehavior,
	int inLevel,
);

Category: Unit / Attributes And Experience

# Examples

# mods/heroesdata.stormmod

GameLib.galaxy

// L11158
UnitXPSetCurrentLevel(libGame_gv_teams[lv_itTeam].lv_core, null, libGame_gv_scalingTicks)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L1703
UnitXPSetCurrentLevel(lv_actualKiller, "MutatorKarmaIncreasedDamageVet", lv_totalKills)
// L3012
UnitXPSetCurrentLevel(lv_bonusUnit, "MutatorKarmaIncreasedDamageVet", 0)