• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

detect when unit wants to drop item OR give item to unit

Status
Not open for further replies.
Level 14
Joined
Mar 4, 2009
Messages
1,156
the problem is that i would like to detect it when unit is ordered to give item to another unit or to drop item to location

i think the only solution would be a special event,maybe if JASS has it...


here are some other events that i cant find too
i saw that there is a fast select unit event in this map
http://www.hiveworkshop.com/forums/...3d-146077/?prev=of=downloads_month&order=DESC

and i also can´t find how to detect when "computer" is ordering unit to do something

like when shop is ordered to select a hero,is it impossible to detect???
 
I'm afraid you can't detect that. I tried retrieving the orders for each ocassion and I got no results.

For the shop sharing, it is automatical, so again, you can't detect that. You need to manually select a hero and then you can have it, but I guess that would make no sense.
Try this:
  • Trigger
  • Events
    • Time - Every 0.5 seconds of game-time
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units of type Shop) and do (Actions)
      • Loop - Actions
        • Custom script: if GetUnitCurrentOrder(GetEnumUnit()) == 852566 then
        • -------- Action here --------
        • Custom script: endif
Didn't test it though; and yes, periodic event would seem like the only solution to get this detected.
 
Status
Not open for further replies.
Top