Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Consumable object script

heehaw Odets
Registered User
Join date: 13 Jul 2005
Posts: 11
08-01-2005 17:13
anyone have a script fr a object that makes a avatar eat it every now and then adn allso makes the object die after a certain amount of time? its to maek food.

me needs one for beverages and one for food >_<

-Please check other topics by me and piece them together to figure out the project im doing O.o-


Allso i cant really pay you >_> but i would eb real real happy if soemone would help. the thing im making definately wont be profitable for me. its going to be free fun for all.
Weedy Herbst
Too many parameters
Join date: 5 Aug 2004
Posts: 2,255
08-01-2005 18:26
From: heehaw Odets
the object die after a certain amount of time?


Check the box - Temp on rez.
_____________________
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
08-01-2005 20:57
I know there are joints that burn out after a certain amount of time. Thee are 5 to a box, and once they are all smoked, thats it, you have to buy more.

There is a cola dispenser which disopensces consumable cola ( I think) and I'm sure there others.

You can achieve what you want by using a timer or a counter that ultimately calls the llDie() function.

You could use Temporary On Rez , but an object that is Temp On Rez only lives for 80 secs.

There are other ways you can make an object non-functional after a certain period of time. For example, if it is an attachment then the AV must own it to use it. If they own it, then it is in their inventory.

Since you can't llDie() and attachment, you have to come up with another way to disable the product. The marijuana joints I mentioned accmplish their goal by never becoming an attachment. The joint simply hovers over and around the AV who is smoking it, associating itself with the smoker by the use of a mouthpiece. The mouthpiece can't really do anything on its own..it just sits quietly in you mouth until a joint is rezzed from a box of joints...The joints are no copy, so when they are rezzed, they are removed from the box's inventory, thereby eventually emptying the box.

After the joint is rezzed, a timer begins and the weed burns! it can only be smoked by those who are wearing the mouthpiece. Using chat commands such as "pass that joint, heehaw" the joint associates itself with the speakers mouthpiece and creates a particle stream connecting the joint and the mouthpiece. The whole time the joint burns, it floats around the smoker waiting for someone else to call to pass it. After a certain amount of time the joint shrinks and eventually goes out in a puff of multicolored smoke particles :-) It's very trippy.

Anyway, I can't rmember the maker, but I'm sure someone will come along and remind me :-)

So, there are a few ways to do what you want, you just have to decide which way will create the best user experience.

Champie

edit: sorry for typos but I'm going to bed...
_____________________