HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Life Bonus

05-02-2006, 08:11 PM#1
Thunder_Eye
Hi, If I have an ability based on Life Bonus which gives
Lvl1: 0
Lvl2: 25
Lvl3: 50
Lvl4: 75
....

If my unit has this ability and I increase its level, it will do nothing. So how can I fix this?
05-02-2006, 08:29 PM#2
Tim.
You can't. Make one ability per level.
05-02-2006, 08:30 PM#3
Thunder_Eye
Gah! there must be someway!
Please you uber wc3 nerds, figure out something!
05-02-2006, 08:45 PM#4
Captain Griffen
Quote:
Originally Posted by Pitzermike[/quote
A special bug allows you to to adjust the max mana and life of a unit without a permanent ability on that unit. Simply make a custom AIlf (Life Bonus) or AImb (Mana Bonus) ability and give it more than one level. Now set the bonus for level one to zero and the level two to the exact opposit you want to achieve. That would be -200 if you want to add 200. Now use UnitAddAbility and SetUnitAbilityLevel to add the ability at level two to your target. There's a bug in those abilities that prevents the bonus from being applied correctly. Then immediately remove the ability again using UnitRemoveAbility. This time it will try to undo the -200 bonus (which hadn't been applied due to a bug) and add 200 to the unit. That's it, you've changed the life/mana without having to keep any abilities on the unit.

Dummy ability, add the HP via triggers using this method.
05-02-2006, 09:41 PM#5
Tim.
:O This is why we all love Mike.
05-03-2006, 12:31 AM#6
shadow1500
Quote:
Originally Posted by Tim.
:O This is why we all love Mike.
Actualy, it was first discovered by Blade.dk.
05-05-2006, 01:52 PM#7
Thunder_Eye
Ok thx, I knew about that bug but couldn't find the thread.
Good that it involves adding/removing abilities too as then I wont get stuck at the 100 limit ;P