HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Give unit UNLEARNED hero ability?

07-09-2007, 09:54 PM#1
GosuSheep
How can i give a Hero an ability without that hero learning the ability.
As in, its still level 0

replies are greatly appreciated
07-09-2007, 10:08 PM#2
Tide-Arc Ephemera
Trigger:
Unit - Add Ability to Unit

You mean adding an ability to a hero? Just add a hero ability via this method...

I hope I understood correctly...
07-09-2007, 10:08 PM#3
moyack
Check if this works:

Collapse JASS:
function GiveUnlearnedAbilitytoUnit takes unit u, integer abil returns nothing
    call UnitAddAbility(u, abil)
    call SetUnitAbilityLevel(u, abil, 0)
endfunction
07-09-2007, 10:22 PM#4
Dil999
If you dont know jass and your using GUI, you would do this:
anything inside <<>> look on the bottom for.
Trigger:
Custom Script: call UnitAddAbility(udg_<*>,'<<**>>')
Custom Script: call SetUnitAbilityLevel(udg_<<*>>,<<**>>,0)


*insert a variable here, this should be the unit you want to add it to.>>
**the rawcode of the ability to be added
07-09-2007, 10:23 PM#5
Anitarf
This won't work, you can only add abilities with triggers, not hero skills. The only way to "add" hero skills is by using engineering upgrade, consult PitzerMike's Warcraft III Ability Guide.
07-10-2007, 02:48 PM#6
xombie
In a failed attempt to create a dual-instance cast (you cast once, then again for the effect) I was using the process of removing/adding the hero abilities from the hero. Though this method failed, because the cooldown reset, it did succeed in adding the hero abilities back and setting them to their proper levels.

I didn't do anything fancy, just:
Collapse JASS:
call UnitAddAbility( hero, abilID )
call SetUnitAbilityLevel( hero, abilID, level )
This worked fine. I think he should just -try- what moyack suggested and if it doesn't work, then move on.
07-10-2007, 03:01 PM#7
Anitarf
Quote:
Originally Posted by xombie
Though this method failed, because the cooldown reset, it did succeed in adding the hero abilities back and setting them to their proper levels.
Yes, you added the hero abilities back, not hero skills, because you never removed those in the first place. You can add and remove abilities at will, but the hero's ability to learn them will remain the same, so after a hero ability is removed from a hero it can still be re-learned at level 1 as it was not removed from the hero skill learn menu because that can not be done (at least not directly, there are some possibilities to alter hero skills with engineering upgrade though).
07-10-2007, 04:27 PM#8
xombie
Understood. I guess I didn't see exactly what you were saying.
07-11-2007, 05:22 AM#9
GosuSheep
yeah. the engineering upgrade for tinker would work nicely. i get to it