Keep track of it in a variable.
Unit picks up an item, check if its the item and then keep track that the unit has it.
Unit drops the item, check where he drops it and keep track of its position
Unit gives the item, keep track of the new unit.
This may be longer to code than your method, but it should be more efficient. |