GoonSquad CopyBot Forum

Full Version: Car Script with kill function when the driver stands up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Guest!! You need to Register or to view the content
i my self use temp rezzing for my grid this seems to not work to well if you drive it seems to randomly disappear sometime's
so if you find a way to timer rez please keep me in the loop Smile
Here is how I have handled it......In a vehicle script, you will have a section that tells it what to do when a driver sits....sets, the controls, animations......etc  

There will also be a section that tells it what to do when the driver stands up, it usually resets the boat to the resting state ???  waiting for the next driver to sit.

You add the command

llDie;

Here is the example from the boat script that I use:

else { // driver got off
                llSetStatus(STATUS_PHYSICS, FALSE); 
                gRun = 0; // turn off running
                init_engine();
                llStopAnimation( animation );
                llPushObject(gAgent, <3,3,21>, ZERO_VECTOR, FALSE);
                llReleaseControls();
                llClearCameraParams();
                llSetCameraParams([CAMERA_ACTIVE, 0]);
                llSetText("",<0,0,0>,1.0);
                llDie();
                llMessageLinked(LINK_SET, 0, "aboard", NULL_KEY);     // driver got off
            }

When the driver stands up, the boat is killed..the nice thing is it is simply gone.  It does not go to your lost and found.  It simply poofs.  I am working on trying to set up a timer so that you have 10 or 15 seconds to sit back on the boat so if the driver inadvertanly stands up, you have a little time to sit back down before you go for a swim.  

I suppose you could simplify that whole section by just using

else { //driver got off
         llDie();
       }

That simplified section with just llDie() seems to do the trick.  

I just made a drop in root Die on a timer.
I would love to see that. Would you mind posting it please?