• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Add a Hero-Spell in the skillmenu with a trigger

Status
Not open for further replies.
Level 2
Joined
Jan 25, 2011
Messages
25
Hey guys

I want to add a herospell in the skillmenu of a hero with a trigger. Not over the maximum of 5.

Its not possible with GUI orders is there a way in Jass or Costumescript.

Thanks for Helping
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Custom script is JASS.
And it's possible in GUI as well.

Add all abilities to the hero.

Then add this trigger:
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Disable Ability 1 for (Picked player)
          • Player - Disable Ability 2 for (Picked player)
          • Player - Disable Ability 3 for (Picked player)
          • // ... do this for all your abilities
When the hero 'gains' a spell, simply enable it again.
  • Player - Enable Ability for Player

There may be other methods as well...
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
pardon, but I think he meant this???...

JASS:
call UnitAddAbility(udg_hero, 'Aloc') //this adds locust ability to your hero (hero is a unit variable)
How would adding the ability Locust to the hero solve his problem? :/
Either I am missing something, or I have absolutely no idea how you could even misinterpret the first post like that.

He wants to be able to add hero abilities (because UnitAddAbility doesn't add abilities which can level).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
no, Im just explaining how to add an ability to a unit/hero, not the 'locust' thing...

and yes UnitAddAbility cant level but I know that you know that it can be leveled up by SetUnitAbilityLevel...
Well, he wants a hero skill, not a unit skill that can be leveled.

Although you can create a spellbook with dummy abilities that look like they're leveling the abilities, while triggers are doing it (that's another option).
 
Status
Not open for further replies.
Top