• 🏆 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] 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).
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
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.
Top