HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to prevent a hero from passing an item to another?

06-13-2006, 06:33 AM#1
buttoxide
I don't think this is in the GUI, anyway...

does anyone know how to prevent a hero from passing an item to another hero?

I tried http://www.wc3campaigns.net/showthre...t=order+string (Vexorian's idea on detecting order IDs) and it turns out that theres no order listed when I order a unit to transfer an item to another hero.

Is there any way to stop a hero who tried to do this? I want the item to be droppable, but NOT directly passable to another hero.

Thanks in advance.
06-13-2006, 06:38 AM#2
weaaddar
Really hard.
You have a trigger that attaches the aquiring hero to the picked up item.
Then
You have another that fires on drop and launches a timer that runs for 0 seconds. You need to cache the item, and the unit who drop ited in on the timer.
Now in the timers call backup, test the item's aquiring hero vs the picking up guys hero. If its not the same or null, you know he transfered the item. So you need to make him drop the item at his feet.

I hate this interaction :/
06-13-2006, 07:34 AM#3
vile
Eh..
You can just use

call SetItemDroppable(item, false)

Then run a timer or something for X seconds and set it to true again.
That will prevent the hero from dropping the item too though, dont know if it suits your map.
06-13-2006, 12:57 PM#4
buttoxide
Thanks for the help, but unless I'm mistaken, I doubt both would work.

For weaaddar: The person who acquired this item wrongly should not be able to acquire this item in the first place.

For vile: Not being able to drop is not suitable for my map map, sorry.
06-13-2006, 01:32 PM#5
Vexorian
buttoxide, it will acquire the item, but no one will notice it, unless you have a trigger that fires when unit acquires an item, in that case simply make the event ignore items that are being dropped.