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

Problem with ITEM!

Status
Not open for further replies.
Level 12
Joined
May 7, 2008
Messages
346
In my map you have hero backpack . The hero backpack serves as backpack to carry items while you farm / gank . It is modeled unit with inventory slots .

Now , when hero backpack acquires an item from shop , it will drop the item immediatly to the floor near the hero backpack , that is only when hero backpack acquires an item from shop , not manually from floor!

If the hero backpack acquires item manually (Not from shop, Example : From ground / hero ) it will do normal action : Set the item in it's inventory.

I have one more question to ask 2)
How can I set that you can't destroy an item if you are not the owner of the item it'self?
 
Level 3
Joined
Mar 2, 2008
Messages
62
1.
  • Item Drop
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Unit-type of (Buying unit)) Equal to Backpack
    • Actions
      • Hero - Drop (Item being manipulated) from (Buying unit)
      • -------- This is for the 2nd point --------
      • Item - Set the custom value of (Item being manipulated) to (Player number of (Owner of (Buying unit)))

as for the 2nd point... give the items absurd hit points, and set their custom value to the player number of the owner.
when the item is attacked (use a generic event), if the player matches the custom value, destroy the item:

  • Item Kill
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(attack))
      • (Player number of (Owner of (Triggering unit))) Equal to (Custom value of (Target item of issued order))
    • Actions
      • Item - Remove (Target item of issued order)
of course it would help to remove leaks here :grin:
 
Level 3
Joined
Mar 2, 2008
Messages
62
im not sure if so many references to 'triggering unit' and 'item being manipulated' leak.

if they dont, awesome :D
 
Status
Not open for further replies.
Top