Detect unit giving item to another unit?

Jonnycakes

New Member
Reaction score
6
I am working on an item stacking trigger, and it works pretty well so far-items stack even if a unit's inventory is full. This is achieved through using dummy powerup items to replace the real items when they are on the ground. One problem arises when trying to give items to another unit-the item being transferred is not a powerup and it says the hero's inventory is full. Is there a way around this?

Question 2 is the big problem. When a hero drops a 'real' item, the item needs to be replaced with a dummy. The event EVENT_PLAYER_UNIT_DROP_ITEM also registers when a unit sells an item (or loses an item for any reason I am guessing). Is there a way to distinguish between when a unit is pawning and dropping an item?
 

Executor

I see you
Reaction score
57
Problem 1: I think not. Only if you could force a dummy ability for the target X instead of the drop item X.

Problem 2: What about interpreting the orders the unit gets? Or check if the "dropped" item still exists = not sold.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
1. Yeah, this actually isn't an order here...
(Using Azlier's PrintOrders gave no result, not even when the unit moves to the other unit which it will give the item too...)
 

Jonnycakes

New Member
Reaction score
6
Yeah I was afraid there wasn't a way for giving items between units...for selling, I tried checking if the item exists, but I think the trigger runs before the item is removed, so I will have to use a timer that expires in .01 seconds or something. Thanks!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top