# Add Learn Ability Level For Unit

Grammar — Add level level(s) to learn ability learnAbility on index index
FlagsNative | Action

Add learned level(s) the specified learn ability index on the specified unit. Consumes skill points.

# Arguments

  • unit — Unit
  • string<gamelink::Abil> — Learn Ability
  • int — Index
  • int — Level

Returns — void

native void UnitLearnAbilAddLevel(
	unit inUnit,
	string learnAbility,
	int index,
	int level,
);

Category: Ability / Learn

# Examples

mods/warcoop/warclassicsystem.sc2modbase.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);