Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

anyone can use vehicle?

Blot Brickworks
The end of days
Join date: 28 Oct 2006
Posts: 1,076
10-17-2009 16:18
I have a vehicle that i want any avatar to be able to ride.I have several scripts that I use .but I don't have the skill to mod them.I have tried but got no success.Can anyone tell me if a script like this is possible.

This only needs to be a basic script suitable for a Bumper car.
_____________________


Blots Plot @ THE OLD MERMAID INN
http://slurl.com/secondlife/Dunbeath
/206/85/26

http://phillplasma.com/2009/05/01/blots-plot-the-old-mermaid-inn/
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
10-17-2009 17:29
Sure, you can make a vehicle script that allows anyone to ride in it.

There is likely to be a section of code in the script something like this:

CODE
     if (agent != llGetOwner())
{
llSay(0, "You aren't the owner");
llUnSit(agent);
llPushObject(agent, <0,0,100>, ZERO_VECTOR, FALSE);
}


That's checking to see that the avatar that sat on it is the owner.

One way to defeat this check with minimal change would be to replace "llGetOwner()" with "agent". "agent" will alway equal "agent" so the user would never get kicked off.

This is sleazy scripting but it's a way to accomplish the goal without having to understand the script's flow and structure beyond being able to recognize its version of the section quoted above.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Kayaker Magic
low carbonated footprint
Join date: 11 Sep 2008
Posts: 109
10-18-2009 18:14
When I first looked into scripting vehicles, I downloaded several samples to learn from. I discovered that learning was hard because 90% of the code in the sample scripts was detecting non-owners and ejecting people who should not be in the vehicle, and only 10% was actually showing you how to script a vehicle. Someone should post a simple vehicle script that only shows how to script a vehicle. Rejecting non-owners should be a separate issue.