HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Knowing where items will drop

11-01-2002, 09:51 PM#1
Peppar
I want to create a function which will replace any item dropped with a unit. This leads to one problem.

When the event for item dropping, "Unit loses an item", is triggered, the item is not on the ground, so I cannot get the position of the item by using GetItemLoc(). Instead i have to Wait some time and let the item be dropped on the ground and then get the position. This means you will see the item on the ground for a brief period of time, until it is replaced with the unit. This is no less than slightly irritating.

"Unit is issued an order targeting a point" doesn't seem to register the dropping of items. Is there really no way to know the position of the item as it is being dropped?
11-01-2002, 10:02 PM#2
Zedric
Check the position of the Hero when the item is dropped, then create the unit at "Random Point in Region (within Distance of Hero)".

Does that work?
11-01-2002, 10:10 PM#3
Peppar
Of course I could, and that is a very good response to the problem, but it would be a very imprecise way of telling where the unit should be placed. This is the type of solution i will make use of if there really is no way of knowing the exact position. I still want to make the function as accurate as possible. Thanks :)
11-02-2002, 03:22 AM#4
Hackman
If you put a very short wait into that function (0.02 secs should be sufficient), it will let warcraft run the item drop routine, so the item will actually be on the ground when you run your triggers.
11-04-2002, 05:44 PM#5
CBWhiz
Simply use REMOVE ITEM, itll be gone before he drops it :D

Then pick the hero's location, say minus 2 left and down, and create ur unit there