# For Each Learnable Ability On Unit

Grammar — For each learnable ability abil in unit do (Actions)
FlagsSubFunctions | Action

Runs the contained actions once for each learnable ability on the specified unit.

# Arguments

  • anyvariable — Ability
  • unit — Unit

Returns — void

#AUTOVAR(unit, unit) = #PARAM(unit);
#AUTOVAR(i) = 1;
for ( ; #AUTOVAR(i) <= UnitAbilityCount(#AUTOVAR(unit)) ; #AUTOVAR(i) += 1 ) {
    #PARAM(abil) = UnitAbilityGet(#AUTOVAR(unit), #AUTOVAR(i));
    #SUBFUNCS(actions)
}

Category: Ability / Loops

# Examples

— None found —