Help with a global "UnitMakeAbilityPermanent"

Level 4
Joined
May 5, 2009
Messages
27
Hi everyone, I need some help with a map I'm creating.


I've designed a map based on engineering upgrades and spellbooks to add spells to my heroes. I've already finished all the spells—more than 90 different ones—and each spell has 3 "clones." I set it up this way so that the hotkeys are always "Q, W, E, and R." In summary, there are nearly 300 spells.


However, I encountered a problem. After all the effort I put into creating this map using triggers, I discovered that morphing abilities have issues when used with spellbooks.


I've read about making spells permanent once they're learned by a hero, but I need to ask: is there a way to ensure every learned spell becomes permanent?


For instance, is it possible to use a general custom script that could do something like this?


"When a unit learns a spell, make the learned spell permanent for the triggering unit."


I’d really appreciate any help with this since I’m not very skilled in programming, but I’m doing my best to figure it out.
 
Level 4
Joined
May 5, 2009
Messages
27
Thanks for your help, mate. At first, I tried to make a single spellbook permanent, just as a test, but for some reason, the spellbook itself was indeed permanent, while the Engineering Upgrade inside it was not.


Then I tried to make just the Engineering Upgrade permanent and disabled, and that worked just fine.


In summary, I completely changed all my spell-learning triggers and found an easier way to handle all spells: getting rid of the spellbooks entirely, making heroes learn just the Engineering Upgrade, and setting it to be permanent and disabled once learned.


Thanks anyway! Your comment made me think and rethink to find a solution. xD
 
Top