| 06-16-2006, 08:47 AM | #1 |
I have a trigger to add an ability to a unit if he acquires an item. JASS:if GetItemTypeId(GetManipulatedItem())=='gopr' then if UnitHasItem(GetManipulatingUnit(),GetManipulatedItem()) then call UnitAddAbility(GetManipulatingUnit(),'A040') else call UnitRemoveAbility(GetManipulatingUnit(),'A040') endif return endif |
| 06-16-2006, 08:53 AM | #2 |
By giving it to them again when they morph. Make a boolean, which tells if the hero has learned the ability. Then make a check every time Morph is cast and if the boolean is True, add the ability to the hero. |
| 06-16-2006, 09:29 AM | #3 |
Much easier way: JASS:call UnitMakeAbilityPermanent(GetManipulatingUnit(),true,'A040') |
| 06-16-2006, 04:57 PM | #4 |
Ah thank you. I knew there was a way but wasn't sure of the command. |
