# Unit XP Set Current Level
Grammar — Sets the current level in veterancyBehavior for unit to level
Flags —Native
|Action
Sets the current level of a unit
# Arguments
unit
— Unitstring
[ gamelink::Behavior ] — Veterancy Behaviorint
— Level
Returns — void
native void UnitXPSetCurrentLevel(
unit inUnit,
string inVeterancyBehavior,
int inLevel,
);
# 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/heroesdata.stormmod
// L11158
UnitXPSetCurrentLevel(libGame_gv_teams[lv_itTeam].lv_core, null, libGame_gv_scalingTicks)
# mods/starcoop/starcoop.sc2mod
// L1703
UnitXPSetCurrentLevel(lv_actualKiller, "MutatorKarmaIncreasedDamageVet", lv_totalKills)
// L3012
UnitXPSetCurrentLevel(lv_bonusUnit, "MutatorKarmaIncreasedDamageVet", 0)