• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Need Help: ADD NEW HERO ABILLITY TO HERO

Status
Not open for further replies.
Level 5
Joined
Jun 16, 2008
Messages
80
I'm making a RPG-Map and what every hero to choose 2 of his 5 abillities, I found 2 solutions in the internet, but both included extremely long triggers and items (etc.).
Is there an easy solution for this?
(The ability must be at level 0 when you get it, and skillable)

It would be very nice if someone helped me.
Thanks! :)
 
Level 7
Joined
Dec 8, 2008
Messages
243
I'm making a RPG-Map and what every hero to choose 2 of his 5 abillities, I found 2 solutions in the internet, but both included extremely long triggers and items (etc.).
Is there an easy solution for this?
(The ability must be at level 0 when you get it, and skillable)

It would be very nice if someone helped me.
Thanks! :)

Are you using the basic, 'click on red cross then on skill you want to learn' system? Skills are always level 1 when you first obtain them. At map initiation, set the available skill points for the unit to 2, so the player can then choose 2 skills instead of 1.
 
Level 5
Joined
Jun 16, 2008
Messages
80
I think you missunderstood me, this might be my fault.
The Heros has not 5 abillities at the beginng, only 3:
Example:

Chani Lightning
Haste Aura
Stats-Bonus

And you can choose 2 further skills for the hero, but there are (for example) 5 to choose from:

Fire Ball
Ice Ball
Thunder Ball
Windwalk
Mirror Image

And you pick Windwalk and Ice Ball.
Then your hero has these 5 abillities:

Chain Lightning
Haste Aura
Stats-Bonus
Windwalk
Ice Ball

-That is what I want :/
Sorry for my not so perfect english :(
 
Level 7
Joined
Dec 8, 2008
Messages
243
Okay, so hows this. It creates a unit, gives an ability to a designated hero, then removes the last created unit. All you have to do is tooltip the unit as if you were displaying the tooltip for the ability which you purchase.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • 2skills Greater than 0
    • Actions
      • Set 2skills = (2skills - 1)
      • Unit - Create 1 dummy for triggering unit at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Add Animate Dead to Players_Hero[(Player number of (Owner of (Last created unit)))]
      • Unit - Remove (Last created unit) from the game
 
Okay, so hows this. It creates a unit, gives an ability to a designated hero, then removes the last created unit. All you have to do is tooltip the unit as if you were displaying the tooltip for the ability which you purchase.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • 2skills Greater than 0
    • Actions
      • Set 2skills = (2skills - 1)
      • Unit - Create 1 dummy for triggering unit at (Center of (Playable map area)) facing Default building facing degrees
      • Unit - Add Animate Dead to Players_Hero[(Player number of (Owner of (Last created unit)))]
      • Unit - Remove (Last created unit) from the game

why create a dummy unit if you only use it for player number of blah blah... just use this...

  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • 2skills Greater than 0
    • Actions
      • Set 2skills = (2skills - 1)
      • Unit - Add Animate Dead to Players_Hero[(Player number of (Owner of (Buying Unit)))]
or if your buying unit is the hero itself


  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • 2skills Greater than 0
    • Actions
      • Set 2skills = (2skills - 1)
      • Unit - Add Animate Dead to Buying Unit
 
Level 7
Joined
Dec 8, 2008
Messages
243
Never noticed there was buying unit in event responces. Still, you might aswell keep the Unit - Remove (Last created unit) from the game, otherwise you'll have a useless dummy walking around the map.
 
Never noticed there was buying unit in event responces. Still, you might aswell keep the Unit - Remove (Last created unit) from the game, otherwise you'll have a useless dummy walking around the map.

I deleted the create dummy unit action in your trigger so there is no need for unit remove...
 
Level 5
Joined
Jun 16, 2008
Messages
80
But if you just use the "Add Abillity" Trigger, you get the abillity on level 1.
But you can't skill it, it is not in the menu, that opens after clicking on the red cross, so it is no real new hero abillity. :/

UPDATE
I made it now.
But I think there is no perfect solution, I made it with a dummy-abillity, as you said, I think there is no better way :(


Anyway, to both of you:
Thank you very much for your nice and polite help!
 
Last edited:
Status
Not open for further replies.
Top