Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Vehicle Script Throws Avatar On Release

ItsNaughtKnotty Cannned
Registered User
Join date: 22 Nov 2006
Posts: 18
02-12-2007 07:42
I'm building a vehicle using the 2003 Hovercraft script but when I stop and either Stand Up or Release I get ejected from the vehicle and fly up into the air about 200 meters and then land about 100 meters away from the vehicle with a none-too-pretty landing. Anybody know why my vehicle is throwing me into the air like that? How can I stop it?
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
02-12-2007 13:09
Not sure if this is related, but could be:

/52/30/162832/1.html
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
02-12-2007 13:37
also, make sure your avatar/agent is not intersecting a prim while seated.

When unsitting.. you can be "kicked" out of a prim. (this is used to good effect when piloting open frame vehicles, where the pilot can become trapped inside the frame after unsitting. the solution is to force an intersection, and thereby turn on the "ejector seat".

Some vehicles and poseballs solve this by breifly turning phantom after unsit.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Lucian Zadeh
Dandy Designer
Join date: 20 Jul 2006
Posts: 4
posing the obvious
02-12-2007 14:26
this might seem a little obvious a suggestion but if you're using a cannabalised script have you checked if there is a llPushObject function that triggers when you unsit? i've seen a few freebie scripts that use this sort of thing, and i've used it myself to push the pilot of my aircraft up a bit so they land on top of the craft :)

edit: 1) on a few occasions when lag has been especially bad i've experienced a neevrending push upwards but that was probably just client side lag from my cruddy machine.
2) pushes from being "ejected" when you interesect a prim aren't usually this severe, normally you just float upwards until you've surfaced from the prim.
_____________________
If you can't say anything nice, at least have the decency to be vague.
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
02-12-2007 15:11
From: someone
2) pushes from being "ejected" when you interesect a prim aren't usually this severe, normally you just float upwards until you've surfaced from the prim.


My experience differs from yours. My friend has an aircraft (no push in the seat... heck, no scripts in the seats yet!) that will kick you a good 20-30m up and over when you unsit. Just an intersecting prim.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Valradica Vanek
Registered User
Join date: 1 Aug 2006
Posts: 78
hopeful answer
02-13-2007 08:10
I went though a long dbug to try to get to the root of this on a project I am working on.

What I discovered is that the order in which you shut down the vehicle parameters is important. I found that you have to turn off the physics, release the controls and then make sure the vehicle is no longer a "vehicle" in that order.

so in the program where you detect that the avatar becomes unseated, put in the following code.

else if (llAvatarOnSitTarget() == NULL_KEY) {
//llOwnerSay("Avatar not Seated";);
llSetStatus (STATUS_PHYSICS | STATUS_RETURN_AT_EDGE , FALSE);

llReleaseControls();
llSetVehicleType(VEHICLE_TYPE_NONE);
}

This seems to work for me. Hope it works for you.