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

[General] How to prevent item sharing?

Status
Not open for further replies.
whats the point, when I can just drop the item on the ground and he can pick it up anyways. I think this needs to be triggered, when you give items it either fires one of the item events, or a order event, you can just order the unit to stop probably(or return the item if it is item event)
 
You could store the "owner" of each item (the player who buys it) in a hashtable. When a unit acquires an item, if they are not owned by the same player as the owner of the item, it drops automatically.

It might also be easier depending on how this is set up. You could make a trigger that drops any item they get immediately. When you have the hero buy items, assuming it is triggered AI, you can turn off the trigger while they do their item purchases and turn it back on right after (I mean within the same function call). That way, only the items they buy will make it through the auto-drop trigger.
 
Status
Not open for further replies.
Back
Top