Jump to content

llGiveInventoryList in an object in the inventory prim


Avalon Criss
 Share

You are about to reply to a thread that has been inactive for 337 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi all

By using the llGiveInventoryList to a prim destination, it would copy the content in the inventory content folder of the prim.

Instead is it possible copy the content in a second object (its inventory) located in the inventory of the prim?

 

 

Link to comment
Share on other sites

If I understand your question correctly, then no: a script can only manipulate the inventory of the same prim it resides in. It cannot do anything to the inventories of other prims (linked or not). You would need to have a dedicated script in the other prim whose inventory you wish to give out. You could set up a communication protocol such that one scripted object can talk to another and ask it to give out its inventory, but again, that requires both objects be scripted.

I did recently submit a suggestion for a new function that could query information about other linked prim's inventories. I could write up another for the others like llGiveLinkInventory, llRemoveLinkInventory, etc. if people would find it useful.

Edit: Oh wait... are you asking if it's possible to give inventory to/from an object that is itself already in inventory? If so, then the answer to that is definitely no. Scripted objects cannot run when they are in an inventory and you simply cannot touch the inventories of inventory items - they need to be rezzed.

Edited by Fenix Eldritch
additional thought
  • Thanks 1
Link to comment
Share on other sites

Yes, the second object receiver it's already in the prim inventory.. so cannot work.

Actually the operation is made manually by right click at the first object, Take copy, and then drop the copy from avatar inventory to the second object inventory.

Another way could be a command by script to send a copy of the whole object to packing containing all the inventory to give out to the receiver object (both rezzed). But I don't know the inverse function of llRezObject... it exist?

 

Link to comment
Share on other sites

1 hour ago, Avalon Criss said:

But I don't know the inverse function of llRezObject... it exist?

No, it doesn't exist. In LSL, (generally speaking) you can give but you can't take; there are no functions to create something in object inventory, except for as you mentioned llGiveInventory. llGetObjectDetails() can be used to learn things about another object, so it might be possible to 'clone' a very simple prim object the script sees in-world, but that would be overly complicated and probably not very useful.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 337 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...