• 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.

Help adding ability to a Hero

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2007
Messages
133
I want to add a ability to a hero after it purchases an item.
  • Item abilities
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set itemege = (Item being manipulated)
      • Set hero = (Hero manipulating item)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of itemege) Equal to Stat Increase
        • Then - Actions
          • Unit - Add Command to hero
          • Unit - Set level of Command for hero to ((Level of Command for hero) + 1)
        • Else - Actions
      • Item - Remove itemege
It just won't work. Can someone help me?

Doesn't matter if it's a hero or non hero ability. All I need is a ability. That's all.
 
Level 8
Joined
Sep 7, 2008
Messages
320
I want to add a ability to a hero after it purchases an item.
  • Item abilities
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set itemege = (Item being manipulated)
      • Set hero = (Hero manipulating item)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of itemege) Equal to Stat Increase
        • Then - Actions
          • Unit - Add Command to hero
          • Unit - Set level of Command for hero to ((Level of Command for hero) + 1)
        • Else - Actions
      • Item - Remove itemege
It just won't work. Can someone help me?

Doesn't matter if it's a hero or non hero ability. All I need is a ability. That's all.

Any ability that (increase none-hero stat and is item ability ) cant level up
 
Level 6
Joined
Aug 12, 2007
Messages
133
Yup. Just won't add my abilities...


I'm trying to add a stat increase.

  • Item abilities
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Stat Increase
    • Actions
      • Set abilityitem = Flame Strike
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of abilityitem for (Triggering unit)) Equal to 0
        • Then - Actions
          • Unit - Add abilityitem to (Triggering unit)
        • Else - Actions
          • Unit - Increase level of abilityitem for (Triggering unit)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
To start with, we have 3 different abilities type; Hero Ability | Unit Ability | Item Ability

You can't mix them up like giving Flame Strike to normal unit (without editing them in Object Editor first)

Perhaps, that ability itself is not Hero Ability, but instead an Item Ability

You can't add Item Ability to a Hero, because it requires a Hero Ability.

Why don't you just use Tome of STR/AGI/INT to increase the Hero's stats ?

You can find them in Object Editor -> Abilities Tab -> Item STR/AGI/INT Gain
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I imported it to another map, everything went great.
What do you meant 'not working for me' ?
Perhaps you did not set the variable to a correct item.

Or you did not enable this:
1. World Editor
2. File
3. Preferences...
4. General Tab
5. Automatically create unknown variables while pasting trigger data

You should enable that by ticking it.
 
Status
Not open for further replies.
Top