| 01-15-2009, 11:19 PM | #1 |
Does anyone know if there is are order IDs for dropping an item on the group and/or dropping an item on another unit? I can't seem to find/detect them. |
| 01-15-2009, 11:38 PM | #2 |
Never found one for dropping an item on another unit. Total bitch. Doesn't even fire an event. |
| 01-15-2009, 11:42 PM | #3 |
Yeah, it seems like its impossible to catch You can order a unit to give an item w/ IssueInstantTargetOrder (thanks Pitzer), but you can't detect it. And you can catch when it gets dropped w/ EVENT_UNIT_DROP_ITEM, but you can't get the target. I'll try some more testing. EDIT: Okay, so using I2S(GetUnitCurrentOrder(GetTriggerUnit())) in a function after EVENT_UNIT_DROP_ITEM fires (from dropping an item on another unit) returns 852001. You can't detect this order normally, but you can have a periodic that checks the units current order. You can't, however, get the target of the drop, which kind of leaves me where I began. Oh well |
| 01-16-2009, 01:38 AM | #4 |
The unit gains an item when you drop it into it's inventory. Devloping an item system of mine I found a solution to this (which I avoided) give each item an attached ID equal to the holding unit. When it switches hands you can check who gave the item to who on the event "unit receives an item" or something like that. Kind of an annoying yet entirely possible work around. |
| 01-16-2009, 06:30 AM | #5 |
When a unit gives an item to another unit, and you detect this trough your method, you could just Enum all Units around the unit which "dropped" the item and check if they have the "dropped" item now...well this works only quite well if you didnt extend the range in which units can give/pickup items a lot. |
| 01-16-2009, 10:11 AM | #6 | |
Quote:
Unless its inventory is full. |
| 03-03-2010, 10:52 AM | #7 | |
Quote:
Im sorry for bumping this.. but what exactly is the order string im supposed to use to move an item to another unit? As for the two targets, which is which? ie, target = hero or item?, instanttarget = hero or item? |
