Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need help finding a vehicle script that allows anyone to ride.

bingbangboom Bixby
Registered User
Join date: 17 Aug 2004
Posts: 92
05-10-2005 06:47
Want to make it a two seater that i can allow anyone else to ride. I have one but doesnt allow anyone else other than the owner to ride.
Jon Marlin
Builder, Coder, RL & SL
Join date: 10 Mar 2005
Posts: 297
05-10-2005 06:57
From: bingbangboom Bixby
Want to make it a two seater that i can allow anyone else to ride. I have one but doesnt allow anyone else other than the owner to ride.


You don't have to change your vehicle script. Just add a second seat, and add a simple sit script to the prim that is the passenger seat.

Use llSitTarget (vector offset, rotation rot) (see the wiki page for details) in this seat prim, in the default state state_entry handler...

- Jon
bingbangboom Bixby
Registered User
Join date: 17 Aug 2004
Posts: 92
05-10-2005 06:59
Well, i mean also leave it out and anyone can ride it. Sorry if I missworded myself, its early. Like so that not just the owner can ride around in it. Thanks
Kris Ritter
paradoxical embolism
Join date: 31 Oct 2003
Posts: 6,627
05-10-2005 07:07
Well, you have to actually build in the functionality to ONLY let the owner ride! Do you not have access to the code? If so, somewhere in there, probably when the avie sits, it'll be doing a test to see if it's the owner and unseating them if not, or simply not allowing control. You just need to remove that.

Have a look at the Basic Vehicle Script.

This is the bit you're interested in, see? Just don't add the test if you want anyone to be able to ride!

CODE

//If sitting down.
if (agent)
{
//We don't want random punks to come stealing our
// motorcycle! The simple solution is to unsit them,
// and for kicks, send um flying.
if (agent != llGetOwner())
{
llSay(0, "You aren't the owner");
llUnSit(agent);
llPushObject(agent, <0,0,100>, ZERO_VECTOR, FALSE);
}
bingbangboom Bixby
Registered User
Join date: 17 Aug 2004
Posts: 92
05-10-2005 08:02
Im not a scripter so im lost, where do i edit it... i tried taking something out but it gave me an error message. Do you have a script you could send me that has that?
Lecktor Hannibal
YOUR MOM
Join date: 1 Jul 2004
Posts: 6,734
05-10-2005 08:15
Bing,
Find this portion in the script :

//If sitting down.
if (agent)
{
//We don't want random punks to come stealing our
// motorcycle! The simple solution is to unsit them,
// and for kicks, send um flying.
if (agent != llGetOwner())
{
llSay(0, "You aren't the owner";);
llUnSit(agent);
llPushObject(agent, <0,0,100>, ZERO_VECTOR, FALSE);
}

and get rid of it.
_____________________
YOUR MOM says, 'Come visit us at SC MKII http://secondcitizen.net '

From: Khamon Fate
Oh, Lecktor, you're terrible.

Bikers have more fun than people !