# Current Learn Ability Level For Unit
Grammar — Current learn ability learnAbility of index index level on unit
Flags —Native
|Function
Returns the current learned level of the specified learn ability index on the specified unit.
# Arguments
unit
— Unitstring
<gamelink::Abil> — Learn Abilityint
— Index
Returns — int
native int UnitLearnAbilGetLevel(
unit inUnit,
string learnAbility,
int index,
);
# Related
Category: Ability / Learn
- Reset Unit Learn Ability —
void
— UnitLearnAbilResetLevel - Add Learn Ability Level For Unit —
void
— UnitLearnAbilAddLevel - Current Learn Ability Level For Unit —
int
— UnitLearnAbilGetLevel - Add Skill Points To Unit Learn Ability —
void
— UnitLearnAbilAddPoints - Learn Ability Skill Point For Unit —
int
— UnitLearnAbilGetPoints
# Examples
mods/warcoop/warclassic.sc2mod — base.sc2data/TriggerLibs/WarClassic.galaxy:171
}else{continue;}
if ((lv_itHeroAbil == lp_heroAbility)) {
return UnitLearnAbilGetLevel(lp_hero, libGAw3_gv_c_War3HeroLearnLink, lv_itIndex);
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:487
lv_i=auto9DD7372B_i;
}else{continue;}
lv_itLearnedLevel = UnitLearnAbilGetLevel(lp_source, "War3_LearnHero", lv_i);
UnitLearnAbilAddLevel(lp_target, "War3_LearnHero", lv_i, lv_itLearnedLevel);
}