ORiley Goodliffe
Registered User
Join date: 30 Dec 2005
Posts: 1
|
01-30-2006 09:36
Is there a way to have an object delete itself after a certain action or amount of time?
I am thinking of a bar drink that must be re-purchased after it has been "consumed".
I am sure there would be other uses, like containers that delete themselves once the contents have been rezzed (houses, cars, etc).
|
Lit Noir
Arrant Knave
Join date: 3 Jan 2004
Posts: 260
|
01-30-2006 09:43
The command is llDie();
This will delete the item completely, not take it back into inventory, but gone for good.
If you are thinking of giving something that will have a limited lifetime, a common way is to pass the "lifetime" as a start parameter with llRezObject, this will get picked up in the on_rez event in the object, and you can set that value to a timer then wait for it to die.
|
Sol Columbia
Ding! Level up
Join date: 24 Sep 2005
Posts: 91
|
01-30-2006 09:56
You can also set the objects to be temporary on rez which doesn't require any programming at all. -Sol Columbia
|