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

Shared inventory

Status
Not open for further replies.
Level 2
Joined
Jan 24, 2014
Messages
16
Hello,i would like to ask,is it possible to bind two inventories? like hero 1 buys an item and the item will have hero 2,in fact that 2 heroes would have 1 inventory. Hero 1 sells an item Hero 2 item will be selled too. Sorry for my bad english :)
 
Level 3
Joined
Jul 16, 2014
Messages
63
I don't think that is possible. You could however trigger 2 units together, so that if 1 of them buys or picks up a items, both of them will get it, and that if 1 of them sells or drops an item, both of them will lose it.

You will need to store the units you want to have the shared inventory in a variable.

This is for when one of the units buys an item. It can probably be done 100 times smarter, but I am to tired atm :)
  • Events
    • Unit - A unit sells an item
  • Conditions
  • Actions
    • If (All conditions are True) then do (Then Actions) else do (Else Actions)
      • (Buying Unit) Equal to YourUnit[1]
      • Actions
        • Hero - Create Mask of Death and give it to YourUnit[2]
    • If (All conditions are True) then do (Then Actions) else do (Else Actions)
      • (Buying Unit) Equal to YourUnit[2]
      • Actions
        • Hero - Create Mask of Death and give it to YourUnit[1]
 
Status
Not open for further replies.
Top