to get rid of objects in avatar's inventory
|
|
Varun Blitz
Registered User
Join date: 22 May 2008
Posts: 62
|
07-14-2008 22:25
i have something attached to me which produces more of its kind and asks the user to attach them but i get multiple copies of that item in my avatar's inventory. how can i get rid of it thru the script itself.
|
|
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
|
07-14-2008 23:12
You don't. This was just discussed within the last few days... /54/e9/192464/1.html
_____________________
There are no stupid questions, just stupid people.
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
07-14-2008 23:19
A script has no access whatsoever to an avatars inventory. It can only "access" the prims inventory it resides in.
|
|
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
|
07-15-2008 03:30
isn't he asking what he can do to the code from the original script in the item itself, to stop the item giving him multiple copies in his inventory?
|
|
Varun Blitz
Registered User
Join date: 22 May 2008
Posts: 62
|
07-15-2008 03:35
From: Dekka Raymaker isn't he asking what he can do to the code from the original script in the item itself, to stop the item giving him multiple copies in his inventory? yeah, buddy that's exactly what i am asking but again the issue is that once i accept the object request to attach i get a copy in my inventory and since no one but me can access my inventory i have to do the tedious work of removing them myself.
_____________________
Laugh till the End !!
|
|
Ee Maculate
Owner of Fourmile Castle
Join date: 11 Jan 2007
Posts: 919
|
07-15-2008 03:38
Use the search feature at the top of the inventory window.. type in the object's name and only that object will be shown, select all and delete.. all done...
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
07-15-2008 04:46
Use the attach event. default { attach(key attached) { if (attached == NULL_KEY) // object has been detached { llDie(); } } }
When the object is detacched it dies.
|
|
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
|
07-15-2008 15:06
From: Beverly Ultsch Use the attach event. default { attach(key attached) { if (attached == NULL_KEY) // object has been detached { llDie(); } } } When the object is detacched it dies. Are you sure about that? Once an object is in an avatar's inventory (like it is when you attach said object) there is no way to remove it from the avatar's inventory with a script.
_____________________
There are no stupid questions, just stupid people.
|
|
Xhawkx Holden
Registered User
Join date: 1 Nov 2006
Posts: 86
|
07-15-2008 15:46
I would think that maybe Laurence's script would work if you did a "DROP" instead of detach..
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
07-16-2008 02:50
I don't think the OP is trying to remove the original object from inventory, they are trying to prevent duplicate been added to inventory. If the attachement spawns a new copy of itself that copy has not been in the inventory, it will only appear in inventory when it is detached. So if you kill it on detach it never makes it to inventory.
|
|
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
|
07-16-2008 06:25
From: Beverly Ultsch ......it will only appear in inventory when it is detached. So if you kill it on detach it never makes it to inventory. Do you try these things before you post about them? Once you attach an object, it IS ALREADY in your inventory. Once you attach an object THERE IS NO WAY TO REMOVE IT FROM YOUR INVENTORY WITH A SCRIPT. From: Varun Blitz i have something attached to me which produces more of its kind and asks the user to attach them but i get multiple copies of that item in my avatar's inventory. how can i get rid of it THRU THE SCRIPT ITSELF.
_____________________
There are no stupid questions, just stupid people.
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
07-16-2008 10:20
From: Laurence Corleone Do you try these things before you post about them? Once you attach an object, it IS ALREADY in your inventory. Once you attach an object THERE IS NO WAY TO REMOVE IT FROM YOUR INVENTORY WITH A SCRIPT. Yes i have tried this. You appear to be missing the point of the question. There are two scenious. 1} Tou have an object in your inventory that is no copy. 2) You have an object in your inventory that allows copy in 1) if you attach it it is no longer in your inventory, if you kill it on detach it will not get back to your inventory, a bit pointless (unless you want a one shot item) but that is how it works. in 2) if you attach it it still remains in inventory, when you detach it you get a second copy in inventory, but if you kill it on detach you still only have the original because the second version never makes it back to your inventory. I suggest you try it. The object of the excersise is to prevent duplicate copys in inventory.
|
|
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
|
07-16-2008 13:49
Let me say this slowly.
Once you attach an object, IT IS IN YOUR INVENTORY. There is no way possible to attach an object and have it NOT be in your inventory. There is no way possible to make an object llDie() on detach.
I suggest you try it.
The object of the exercise is to answer his question which I did in the first reply in this thread.
_____________________
There are no stupid questions, just stupid people.
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
07-16-2008 14:02
You clearly haven' tried it.
Follow thes easy stages.
1} create two prims, name them box1 and box2, ensure both are copy enabled
2) add my script to box2
3) take both into inventory
4) attach box1, detach box1 you now have two versions of box1 in your inventory.
5) attach box2, detach box2, you still only have one version of box2 in your inventory.
6) make them no copy, repeat the above excersise, you now have one copy of box1 and no copys of box2 in your inventory.
Why would anyone want an inventory item that is set to nocopy but autodestructs, the idea is to prevent inventory clutter.
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
07-16-2008 16:34
Hmee i appear to be wrong with my last test, i need to check on the issue of rezzinf an attachement
|