• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Skills

Status
Not open for further replies.
Level 13
Joined
Jun 3, 2011
Messages
1,058
Hey Guys, Is there a link for buy able skills? can you please help me with this ow and it can be bought throw lumber or skill points help please

A skill that is buyable in a unit for example i wan't to buy Fatal bash after i click it it adds to my abilities
 
Last edited:
Level 12
Joined
Sep 11, 2011
Messages
1,176
i dont get what you wanna do....

he mean that we can buy the skills from a shop using lumbers or what he called skill points.

this is some simple way to do that.

create an item and name it to your ability then put it on a shop.

for example you want to sell Animate Dead, then make an item and name it Animate Dead and set the cost to how much lumber you want.

after that create a trigger like this :

  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Animate Dead
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Unit - Add Animate Dead to (Triggering unit)
        • Else - Actions
but i'm sure someone has a better way to do this.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
The basic concept is;
1. If AbilityLevel == 0 for that unit, add the ability, if it is not, then Add Level of that Ability to that unit.

That's all.

EDIT:
  • Melee Initialization
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Sold Item)) Equal to Acid Bomb Item
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Acid Bomb for (Buying unit)) Equal to 0
            • Then - Actions
              • Unit - Add Acid Bomb to (Buying unit)
            • Else - Actions
              • Unit - Increase level of Acid Bomb for (Buying unit)
        • Else - Actions
For this case, it's better to use Hashtable approach rather than looping using Linear Search.
 
Last edited:
Status
Not open for further replies.
Top