PDA

View Full Version : How to I get the source from draginfo in manager_item.lua?



alloowishus
November 19th, 2024, 01:03
this is the function


function handleAnyDrop(vTarget, draginfo)
local sDragType = draginfo.getType();
local sClass2, sRecord2 = draginfo.getShortcutData();

I am doing auto purchasing of items when they are dragged into the inventory, however, I only want to deduct the coins when the source from the items table, not from when they are dragging items around in their inventory. How can I find this info? Thanks!

damned
November 19th, 2024, 01:10
As always do a


Debug.chat("draginfo: ", draginfo);

and see what it outputs.
Then you can work out what and how to pull the data you need.

alloowishus
November 19th, 2024, 23:12
As always do a


Debug.chat("draginfo: ", draginfo);

and see what it outputs.
Then you can work out what and how to pull the data you need.

Great, thanks!