HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Where is event "hero moves item in inventory"

08-28-2008, 06:40 AM#1
MCV
Could you assist me in telling me where to find the event for when a unit moves a item from one slot to another in the inventory? I can't find it.
08-28-2008, 07:36 AM#2
Pyrogasm
There is no event, but actually when you move an inventory item the unit is given an order, so you can catch it with the "Unit is issued an order ___...". However, it only has an integer order, not a string order.

So, to find out what the order is:
Trigger:
Collapse Events
Unit - A unit is issued an order with no target
Unit - A unit is issued an order targeting an object
Conditions
Collapse Actions
Custom script: call BJDebugMsg("Order: "+I2S(GetIssuedOrderId()))
Then write it down or something.
08-28-2008, 07:45 AM#3
DioD
This is target order, item is target and order id - slot to move.
08-28-2008, 08:22 AM#4
MCV
So it's just a number? Does it start on 1 or 0?
08-28-2008, 08:23 AM#5
DioD
its LONG number.
08-28-2008, 08:29 AM#6
MCV
Thanks. I'll use the above thechniques to find it.
08-28-2008, 08:34 AM#7
Pyrogasm
Yeah, it's something like 8522013. However, there are 6 different numbers, one each for the slot that the item is being moved to. So slot one might be 8522013, slot two would be 8522014, slot three 8522015, etc..
08-28-2008, 02:18 PM#8
Ammorth
Vexorian made a little function (check the script resources) that would return the slot number instead of the huge-ass-number.
08-28-2008, 02:55 PM#9
Vexorian
I don't think I have uploaded it yet, you are right that I should.
08-28-2008, 09:17 PM#10
Ammorth
You're right, it was for the use event, not for the move event.