Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

eating/drinking stuff only once script, delete food and drinks after use

Jo Yardley
Registered User
Join date: 25 Feb 2009
Posts: 76
06-14-2009 09:25
Hello all,

I want to make food and drinks that disappear after a few bites/sips.
At a party I once was given a piece of cake that disappeared after just a few bites, it was great fun as people kept returning to the table for more.
It would also be nice in my club so my waiters are called more often for new drinks in stead of people sitting there drinking from one beer for hours.
It would also be nice for the cigarette/candy lady if the customers want more peanuts after finishing their bag.

I have looked around but can't find it.
Can anyone help me find a script that I can modify that makes a object once worn disappear after a few bites/sips?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
06-14-2009 09:35
the relevant calls are llSetAlpha, or in combination, llDetachFromAvatar, and either llDie or llSetStatus( TEMP_ON_REZ, TRUE )
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Jo Yardley
Registered User
Join date: 25 Feb 2009
Posts: 76
06-14-2009 12:56
Eeek, much too complicated for a newbie like me ;)
I have no idea how to use that in a script.
Perhaps someone can share an example of what a script would look like for a object that is worn and then 'eaten', like a apple, and then it disappears after a few bites?

Thank you for giving me some idea of what the stuff I am looking for is called, it gives me some direction :)
Ilayda Reina
Registered User
Join date: 21 Nov 2007
Posts: 31
06-15-2009 07:25
First of all you should plan it on your mind and specify the triggers you think about.
Eating will start but how ? on sit? on touch? on attach ?
how long it will last ? a predefined duration (timer) ? till unsit ? till re-touch ?
how you want them disappear ? if llDie it should be rezzed in the beginning. or llSetAlpha or maybe detach ?
than look at the mentioned functions and events in wiki , check their examples.
Jo Yardley
Registered User
Join date: 25 Feb 2009
Posts: 76
06-15-2009 07:36
I want someone to receive/buy a food object like a bit of candy.
Then as soon as this person wears it and starts eating it, it should after a certein time, lets say 1 minute, detach and become a useless item in their inventory.
I have looked for scripts like these but because I have no scripting experience to speak off, putting all this into one workable script is too hard for me at this moment.