HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit Dropped Item on Another Unit Event

09-07-2005, 02:29 AM#1
SuperDuperGuy
Anyway to capture this event? Doesn't seem to fire on a Issue Order Target event. If a player loses an item, i can get the order using the Current order of unit variable, but that doesn't let me know the target unit. Am I hosed on this one? No way to do it?
09-07-2005, 08:35 AM#2
Burning_Dragoon
I'm not sur I understand your request, but....

Well use the event unit- a unit get an item (I don't really know how it is translated, I'm french, so french editor )

Condition

item being manipulated = "your item" -> from item comparison
hero manipulating item = "your heros" -> from unit comparison

Action.........

That's all. tell me if it works ( I'm busy, 4 models in work lol )
09-07-2005, 04:58 PM#3
SuperDuperGuy
This doesn't work cause the hero doesn't always get the item (for example thier inventory is full...)
09-10-2005, 06:03 PM#4
Ant
As far as my limited knowledge goes...

You can try to detect both events where "A unit acquires an item" and "A unit loses an item" in separate triggers. For the trigger that fires first (should be the unit lose trigger), store the item lost. If this item is gained by the unit in the next trigger, then you've effectively detected transfer of an item from one unit to another.

This is assuming that the trigger will always run in the same order and all that stuff which I haven't tried. Anyway otherwise you can just store both the item lost and the item gained in different variables and compare them.
09-11-2005, 05:12 PM#5
SuperDuperGuy
The problem here is that item gained does not trigger in the case the inventory is full. You can't tell the difference between a drop on unit event and drop item event when the unit's inventory is full, it is treated just like drop item on position event. The drop item order doesnt trigger any of the issued order triggers, but there is an order associated with it. At the time the unit loses an item, it has an order ID (check current order of unit) but its the same for droping on point and unit. and since this event cant be grabbed with triggers, there is no option of used target of issued order variable.