Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Temporary items questions??

Groovdafied Jie
Registered User
Join date: 28 Apr 2007
Posts: 15
06-04-2007 18:40
Hi,

So I'm making a food stand which is handing out free food and stuff, which will be animated and all the sorts.

So let's say my avatar goes and gets drink, and in RL you'll have to throw the drink away cause it's empty and get another. Well I would like to know if there's a way to delete an object from the avatar after a certain period of time?

I'm trying to RP where the person is drinking/eating something and after a while the object will say "All Done" and the item will delete itself, so the AV will go and get another drink/food.

Thank you, I appreciate your time.
Solomon Devoix
Used Register
Join date: 22 Aug 2006
Posts: 496
06-04-2007 19:10
Set the timer event for how long you would expect it to take them to eat or drink the item, then use the llDie command to make the item delete itself.
Groovdafied Jie
Registered User
Join date: 28 Apr 2007
Posts: 15
06-04-2007 23:27
From: Solomon Devoix
Set the timer event for how long you would expect it to take them to eat or drink the item, then use the llDie command to make the item delete itself.


Ok this is what I tried doing...

I looked up llDie to see for any syntax errors...but I added a detaching line cause it wouldn't do anything with just the die command, and when i added the llDetachFromAvatar + llDie on the next line, it doesn't delete from the inventory.

The code works, I got it to loop and at a certain time, it will detach from the character, but I can't get the object to delete completely from the avatar.

Any suggestions?
Serenarra Trilling
Registered User
Join date: 14 Oct 2006
Posts: 246
06-05-2007 03:56
llDie only deletes the currently rezzed object.

I think it's impossible to delete something from someone's inventory.

But, if you make it no copy, doesn't it get removed from the inventory when it's rezzed?
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
06-05-2007 06:11
Yeah llDie doesn't work with attachments.

There's an interesting idea in the old Wiki here:

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llDetachFromAvatar

Basically after the timer runs out you enter a new state which informs the user and doesn't have any of the "fun" stuff like animations. Combine this with llSetObjectName to "empty soda can" or some such, and an llDie command should they try to rez it on the ground, and you're pretty well covered.