I have a learn ability that starts with 0 points. When you click on an ability it adds 1 point to the learn ability threw triggers.
When you use a ability with the new point it works one time. It's because the levels of the ability is only one, but I don't want to add a crap load of levels as this will be manipulated a lot of times.
How do I reset the level of the ability in the learn ability?
Like lets say I use it with my first point, and it's now level 2. How do I reset it back to level 1?
WHY does this not work? I don't get it. Neither one of these work. If I change the catalog one to a +1 it will increase, but will not subtract.
UPDATE:
Ok. So, when I load a hero from a bank file and it sets the learn ability level/points. That doesn't reflect the number of points the actual ability has in the catalog for some reason.
For instance, I load up a hero that is level 12. He has 11 points in the learn tree. If I try to use the above trigger it will fail saying it can't write to the catalog value. However, if I go level up and get more points, it subtracts from the total.
SO, how can I manipulate this with bank files? The bank saves all the levels of the abilities/upgrades inside of the tree, I just need to subtract that total amount of points already spent into it.
I have a learn ability that starts with 0 points. When you click on an ability it adds 1 point to the learn ability threw triggers.
When you use a ability with the new point it works one time. It's because the levels of the ability is only one, but I don't want to add a crap load of levels as this will be manipulated a lot of times.
How do I reset the level of the ability in the learn ability?
Like lets say I use it with my first point, and it's now level 2. How do I reset it back to level 1?
There is the UnitAbilityChangeLevel function, you could try that one.
@Kueken531: Go
Nope that doesn't work. I tried using catalogs as well without any success. I tried "Index[0]" and "Cost[0].Index[0]" without any luck
@Kueken531: Go
Wait did you mean this function:
@Zero0018: Go
try to use it as -1 instead of zero. If I recall corretly It adds it to the level instead of setting (fucking blizzard and their weird systems)
Indeed. In galaxy it is called Change Level, but in Gui this translates into Set Level for whatever reason.
@Kueken531: Go
@zenx1: Go
WOW... Ya the -1 worked with the set level function. That's retarded. Stupid blizzard always gotta complicate simple matters
WHY does this not work? I don't get it. Neither one of these work. If I change the catalog one to a +1 it will increase, but will not subtract.
UPDATE:
Ok. So, when I load a hero from a bank file and it sets the learn ability level/points. That doesn't reflect the number of points the actual ability has in the catalog for some reason.
For instance, I load up a hero that is level 12. He has 11 points in the learn tree. If I try to use the above trigger it will fail saying it can't write to the catalog value. However, if I go level up and get more points, it subtracts from the total.
SO, how can I manipulate this with bank files? The bank saves all the levels of the abilities/upgrades inside of the tree, I just need to subtract that total amount of points already spent into it.
How can this be done?