Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

kill a zombie vehicle on no script land?

Sho Iuga
Registered User
Join date: 6 Jun 2007
Posts: 35
03-02-2008 15:27
I made a balloon, that autofollows linden roads. So far so nice. But I wanted it to delete itself once the last sitting avatar stood up. I call it a zombie vehicle, as no one is sitting on it anymore.

I tried:

change(integer cng)
{
if(cng & CHANGED_LINK)
{
key idoflastprim = llGetLinkKey(llGetNumberOfPrims());
if( llGetOwner(idoflastprim) != idoflastprim ) llDie();
}
}

This works fine on script land. But my balloon flies over no script land (the lindenroads) and the script in it only works as long as it has taken controls from an avatar. The moment the last avatar stands up, the script stops (as it doesnt have the taken controls anymore). The change event handler is never reached (unless the balloon drift into some script allowed land).
I dont want to litter the landscape with my balloons. So question is: is there a way to kill it once the last rider leaves his seat?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-02-2008 16:21
temp on rez vehicles will die when the av on them gets up, this might do exactly what you want.
_____________________
|
| . "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...
| -
Sho Iuga
Registered User
Join date: 6 Jun 2007
Posts: 35
03-03-2008 00:29
yup, thanks, that is what I was looking for.
Rez Gray
Registered User
Join date: 2 Apr 2007
Posts: 23
03-06-2008 21:33
Well. I would set a timer on last sit up, do a llkey2name check for owner after awhile.

May I ask how you're following linden roads?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-07-2008 01:38
timer isn't gonna do any good on no script land, and take controls won't override it if the av gets up.
_____________________
|
| . "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...
| -
Sho Iuga
Registered User
Join date: 6 Jun 2007
Posts: 35
03-07-2008 10:40
about following the linden roads:

Basically I do the following: I take a few points on a line perpendicular to the current move direction and a few meters ahead. I check 3 times a second wether theses points are over a lindenroad (using the llGetParcelDetails and llGetLandOwner functions ) and then I adjust the movedirection depending which of those points are on a linden road.

It works quite well for a slow moving vehicle.
Though it needs a couple of more checks to handle situations like a lindenroad that is parallel to a simborder when the sim border is in the middle of the road.