WoW:API PickupContainerItem: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 31: Line 31:
:If you have nothing else active, calling this will "pick up" the item, causing the cursor to change to the item's icon.  Once this has happened, calling this a second time will swap the two items.  Likewise, calling this when an ability that targets an item is active (for example, enchanting), then this function will "cast" that ability on the targetted item.
:If you have nothing else active, calling this will "pick up" the item, causing the cursor to change to the item's icon.  Once this has happened, calling this a second time will swap the two items.  Likewise, calling this when an ability that targets an item is active (for example, enchanting), then this function will "cast" that ability on the targetted item.


The following code will not work
PickupContainerItem(0,1)
PickupContainerItem(0,2)
PickupContainerItem(0,2)
PickupContainerItem(0,3)
but
this one will work
PickupContainerItem(0,1)
PickupContainerItem(0,2)
PickupContainerItem(0,3)
PickupContainerItem(0,4)
Trying to pickup the same item twice in the same "time tick" does not work. To get around the problem, you need to use an _OnUpdate function, check that at least .1 time has elapsed since the last time before picking up the same item.


----
----
{{WoW API}}
{{WoW API}}
Anonymous user