PDA

View Full Version : Trying to get the node of an item in the "onDrop" function for char_invlist.lua



alloowishus
February 3rd, 2024, 19:06
This is the function:

function onDrop(x, y, draginfo)
return ItemManager.handleAnyDrop(window.getDatabaseNode() , draginfo);
end

I would like to to an some auto updating of the item after it is dropped, how do I get it's node? When I output window.getDatabaseNode() in the debugger it gives me s'userdata: 00000225FE821F58' Thanks!

Moon Wizard
February 5th, 2024, 00:36
There's no mechanism to capture the newly created item on drop in that scenario.

The drop not only handles single entry drops, but also parcel drops; plus the transfer is usually sent to GM, so that character to party sheet or character to character transfers are handled correctly.
You would have to come at it from a different angle.

Regards,
JPG