The solution is to not level abilities but to make them scale with buffs or other means. Ability level mechanics in SC2 are extremely buggy, especially when used with a Learn type ability.
Say one makes a 3 level ability like a Warcraft III standard hero ability. Level 0 is both unlearnt and just learnt (WC3 level 1) so cannot be used to test if an ability has been learnt. Level 2 is the theoretical maximum (WC3 level 3). However there is also a level 3 if you queue up learn orders or use triggers (WC3 level 4!?, it should not exist) which can not only waste a Learn ability skill point but also bug/break triggers and ability mechanics.
Trigger events relating to learning an ability will fire each time the ability is issued to be learnt, not how many times it is learnt. If one has a Learn ability with 4 skill points and uses it to learn a 3 level ability currently unlearnt by queing up its learn orders until maximum queue count then a trigger firing in response to learning will run well over 10 times (maximum queue count times) and the ability will be level 3 (WC3 level 4).
The solution is to not level abilities but to make them scale with buffs or other means. Ability level mechanics in SC2 are extremely buggy, especially when used with a Learn type ability.
Say one makes a 3 level ability like a Warcraft III standard hero ability. Level 0 is both unlearnt and just learnt (WC3 level 1) so cannot be used to test if an ability has been learnt. Level 2 is the theoretical maximum (WC3 level 3). However there is also a level 3 if you queue up learn orders or use triggers (WC3 level 4!?, it should not exist) which can not only waste a Learn ability skill point but also bug/break triggers and ability mechanics.
Trigger events relating to learning an ability will fire each time the ability is issued to be learnt, not how many times it is learnt. If one has a Learn ability with 4 skill points and uses it to learn a 3 level ability currently unlearnt by queing up its learn orders until maximum queue count then a trigger firing in response to learning will run well over 10 times (maximum queue count times) and the ability will be level 3 (WC3 level 4).