# Current Learn Ability Level For Unit

Grammar — Current learn ability learnAbility of index index level on unit
FlagsNative | Function

Returns the current learned level of the specified learn ability index on the specified unit.

# Arguments

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

Returns — int

native int UnitLearnAbilGetLevel(
	unit inUnit,
	string learnAbility,
	int index,
);

Category: Ability / Learn

# Examples

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