• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Item's abilities/bonuses from another inventory

Status
Not open for further replies.
Hello, can someone help me figure it out how do i replicate the bonus of the item without the item in the player inventory? (Or is it even possible?). Let's say i have another dummy unit with inventory (it's a hero, invisible, a dummy that is always moved to the current position of the main hero/character), i treat that unit as a bag, but when i store the item at the bag (dummy unit) the bonus of the items (let's say claws of damage +15), the +15 damage should apply to both the bag and the player character (main hero).
 
depending on how complex your items are in your map. u can simply add/remove the ability that corresponds with your item to your hero



list of items to there abilitys.
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ITEMS[1] = Claws of Attack +15
      • Set ITEMS[2] = Ring of Protection +5
      • Set ITEMS[3] = Khadgar's Gem of Health
      • Set ITEM_ABILITY[1] = Item Damage Bonus (+15)
      • Set ITEM_ABILITY[2] = Item Armor Bonus (+5)
      • Set ITEM_ABILITY[3] = Item Life Bonus (Greater)
      • Set ITEMCOUNT = 3
items obtained
  • item obtained
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (YOUR BAG)
    • Actions
      • For each (Integer integerloop) from 1 to ITEMCOUNT, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to ITEMS[integerloop]
            • Then - Actions
              • Unit - Add ITEM_ABILITY[integerloop] to (YOUR HERO)
            • Else - Actions
items lost

  • item lost
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (YOUR BAG)
    • Actions
      • For each (Integer intergerloop2) from 1 to ITEMCOUNT, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to ITEMS[intergerloop2]
            • Then - Actions
              • Unit - Remove ITEM_ABILITY[intergerloop2] from (YOUR HERO)
            • Else - Actions
 
Status
Not open for further replies.
Back
Top