# Add Learn Ability Level For Unit
Grammar — Add level level(s) to learn ability learnAbility on index index
Flags —Native
|Action
Add learned level(s) the specified learn ability index on the specified unit. Consumes skill points.
# Arguments
unit
— Unitstring
<gamelink::Abil> — Learn Abilityint
— Indexint
— Level
Returns — void
native void UnitLearnAbilAddLevel(
unit inUnit,
string learnAbility,
int index,
int level,
);
# 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/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:488
}else{continue;}
lv_itLearnedLevel = UnitLearnAbilGetLevel(lp_source, "War3_LearnHero", lv_i);
UnitLearnAbilAddLevel(lp_target, "War3_LearnHero", lv_i, lv_itLearnedLevel);
}
lv_c = UnitBehaviorCountAll(lv_caster);