Altering an item in av's inventory
|
|
Nekokami Dragonfly
猫神
Join date: 29 Aug 2004
Posts: 638
|
03-09-2005 19:48
Hi, I'm making popsicles for a newbie income project I'm working on (Flying Ice Cream Truck). The popsicles get smaller and show more of the stick as the "eating" animation runs, they drip particles, and at the end, they tell you they are all gone and detach themselves. However, they are still in inventory. They won't continue to run if you "wear" them again, because a variable has been altered that indicates that they are "eaten," but I'd really like to avoid filling people's inventory with trash. At the very least, I'd like to change the name of the item to "Used Popsicle Stick", but though I change the name successfully before detaching the item (it whispers its name), the object in inventory still has the old name. Any suggestions? It doesn't seem possible to make an attachment temporary on rez, it doesn't seem possible to delete an item from inventory, it doesn't seem possible to force an avatar to drop an item. Leaving a non-working item in someone's inventory seems rude, or at the very least, confusing. The reason the popsicles should not be reusable is so newbies can continue to sell them from the truck. The truck will be set with extremely low prices, e.g. L$1-3. Besides, such frozen treats are ephemeral by nature.  As a related question, is it possible to cause an item to be worn as soon as it is bought, automatically? It seems to me that ice cream and popsicles should be immediate experiences.  Thanks for any advice, neko
|
|
Spuds Milk
Registered User
Join date: 28 Sep 2004
Posts: 94
|
03-09-2005 20:49
don't know if an attachment will do this (and if namechange doesn't work, seems unlikely) but could end with an llDie(); which will destroy entire object
|
|
Nekokami Dragonfly
猫神
Join date: 29 Aug 2004
Posts: 638
|
03-10-2005 06:51
I did end with llDie(), but that doesn't destroy an object in inventory.  neko
|
|
McWheelie Baldwin
Registered User
Join date: 9 Apr 2004
Posts: 154
|
03-10-2005 06:58
Are they no-copy? If the item is set as copyable, then there will ALWAYS be a copy in the person's inventory, unless THEY delete every instance of it by hand. I would try setting them to no-copy, the name change should at least show up in the inventory then. I am not sure about llDie() or name changes on non-copyable items though. It would require some in world testing.
McW
|
|
Nekokami Dragonfly
猫神
Join date: 29 Aug 2004
Posts: 638
|
03-10-2005 07:01
They are no-copy. The name change doesn't show up in inventory. (Should I report a bug?)
I posted to Linden Hotline, too, but I think folks in this forum are at least as likely to know the answer, if there is one....
Thanks,
neko
|
|
McWheelie Baldwin
Registered User
Join date: 9 Apr 2004
Posts: 154
|
03-10-2005 07:15
From: Nekokami Dragonfly They are no-copy. The name change doesn't show up in inventory. (Should I report a bug?)
I posted to Linden Hotline, too, but I think folks in this forum are at least as likely to know the answer, if there is one....
Thanks,
neko Well given that they are no-copy, then I don't think there is a way to do what you want to do. Unfortunately it seems like a limitation in the scripting. It's probably in place that way to protect buyers from losing items they paid for. I don't think limited use items were really something that was considered when permissions and LSL was put together. I too, have been thinking about ways to make limited use items, so I can offer demo versions of some of my creations. I'm still trying to figure out how best to handle things of this nature as well. Sorry I wasn't of any help, but I wish you luck with your project. McW
|
|
Nekokami Dragonfly
猫神
Join date: 29 Aug 2004
Posts: 638
|
06-28-2006 10:30
Hi folks, This is a revival of an old thread (and an old project). I'm just wondering if anything has changed regarding these two questions: 1. Can I script an object to delete itself from inventory (or at least change its name in inventory, e.g. to "used popsicle stick"  when it is no longer functional? 2. Is there a way to configure a purchase so the purchaser of an object accepts it directly to attachment, rather than to inventory? I know you can't attach an object to a non-owner by script, but once the object has been purchased, can it be attached? Or could the object be rezzed next to the vendor so the customer/new owner can click to attach? It would be cool to have another option on selling objects, e.g. instead of "sell copy" you could have "sell copy to attachment." Or a checkbox that could work on either "sell original" or "sell copy," e.g. "Offer to Attach on Purchase." (That way if the customer *really* wanted to put their ice cream in their pocket rather than eating it right away, they could, though that seems counter to the theme of buying ice cream from an Ice Cream Truck.) Thanks, neko
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
06-28-2006 11:17
The answers are still the same I'm afraid.
|
|
Jesse Malthus
OMG HAX!
Join date: 21 Apr 2006
Posts: 649
|
06-28-2006 14:14
If you notice, when you edit something while it's attached, it has no name or description. This might be related to your issue.
|
|
Paradigm Brodsky
Hmmm, How do I set this?
Join date: 28 Apr 2004
Posts: 206
|
11-12-2006 08:45
Please check out Prop 2323 http://secondlife.com/vote/vote.php?get_id=2323I've been trying to do similar things for a while. I want to make outfits that change state, but everytime you take something off you get another copy in inv. I wish I could make them drop and then delete or something. If LSL is trying to avoid limited use items then perhaps we could have a drop command that only works with copyable items, that way people still wont lose stuff they paid for. This would improve the fasion and avitar industry alot!
_____________________
I'll do anything for love, most things for money, and some things for a smile.
|
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-12-2006 12:17
For information on the technical side of this thread, please see Attention Kelly: newbie trying to use setobjectname but its not working as expected in Linden Answers, and the thread it refers to.
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|
|
Raeyan Aldrich
Registered User
Join date: 14 Oct 2006
Posts: 44
|
11-12-2006 13:26
neko just a thought... are you certain the object is no-copy for you? i vaguely remember working with a script a couple weeks back that used llDie to kill an attachment
|
|
Paradigm Brodsky
Hmmm, How do I set this?
Join date: 28 Apr 2004
Posts: 206
|
11-12-2006 16:40
I just tried using llDie on an attachment. Didn't work.
_____________________
I'll do anything for love, most things for money, and some things for a smile.
|
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
11-12-2006 17:49
I just tried using llDie on an attachment.Ok.Didn't work.Expected that.
_____________________
- ninjafoo Ng Says:
November 4th, 2006 at 7:27 am We all love secondlife so much and were afraid that the magic will end, nothing this good can ever last…. can it?
|