• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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