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

Problem with ITEM!

Status
Not open for further replies.
Level 11
Joined
May 7, 2008
Messages
300
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