<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/index.php?action=history&amp;feed=atom&amp;title=LSL_Protocol%2FAutoBahn</id>
	<title>LSL Protocol/AutoBahn - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/index.php?action=history&amp;feed=atom&amp;title=LSL_Protocol%2FAutoBahn"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/AutoBahn&amp;action=history"/>
	<updated>2026-07-26T11:10:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/AutoBahn&amp;diff=14671&amp;oldid=prev</id>
		<title>Grumble Loudon at 10:16, 5 March 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol/AutoBahn&amp;diff=14671&amp;oldid=prev"/>
		<updated>2007-03-05T10:16:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LSL Header}}&lt;br /&gt;
[[LSL Protocol|Back to Protocol page]]&lt;br /&gt;
&lt;br /&gt;
==Autobahn public and private roads (Tested Version 1) ==&lt;br /&gt;
The Autobahn is a automatic vehicle system designed so that scripts can steer for you with you controlling the speed and lane.&lt;br /&gt;
It uses a series of named prims that each having extra information in the name field.&lt;br /&gt;
&lt;br /&gt;
Because the vehicle flies based on the prim information, the vehicle can be any direction. Even upside down!  :eek:&lt;br /&gt;
&lt;br /&gt;
With each prim holding the key to the next prim, the vehicle only needs to use llKey2Name to find the next section.&lt;br /&gt;
&lt;br /&gt;
== The road ==&lt;br /&gt;
You can build two types of Autobahn roads.&lt;br /&gt;
&lt;br /&gt;
1) Simple roads where the road is mostly flat and you don&amp;#039;t have complex overpasses. The target position is always above the prim a set distance making it easy to drop a update script into an existing road.&lt;br /&gt;
&lt;br /&gt;
2) Roads where the road controls the rotation of the vehicle. &amp;#039;&amp;#039;This makes great roller coasters.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The prim name holds a key of the next road prim for each lane so that the vehicle can use llKey2Name to get the next prim&amp;#039;s data.&lt;br /&gt;
The prim name also holds the road target position and rotation so that the vehicle only has to use a scanner when it first starts.&lt;br /&gt;
&lt;br /&gt;
Each lane is composed of prims named  &amp;quot;&amp;quot;&amp;quot;PublicRoad&amp;quot;&amp;quot;&amp;quot; Followed by data and choices of next keys&lt;br /&gt;
&lt;br /&gt;
Fields are separated by  &amp;quot;;&amp;quot; symbols to make it easier for the script to parse the string using llParseStringKeepNulls&lt;br /&gt;
#Version number   = 1&lt;br /&gt;
#This Lane number = 1 &lt;br /&gt;
#Maximum recommended speed in m/s (optional)&lt;br /&gt;
#Descriptive road name (optional)&lt;br /&gt;
#Lane target position &amp;lt;X,Y,Z&amp;gt;. This is 1m above the road surface so that the vehicle does not have to process the rotation if it is built with a 1m high center. &lt;br /&gt;
#Lane Rotation &amp;lt;x,y,z,s&amp;gt; or blank for a simple Autobahn Road section. ZERO_ROTATION is defined as upright and pointing east.&lt;br /&gt;
#key for next prim of lane 1&lt;br /&gt;
#key for next prim of lane 2(optional)&lt;br /&gt;
#key for next prim of lane 3(optional)&lt;br /&gt;
#key for more lanes...&lt;br /&gt;
&lt;br /&gt;
You can force vehicle to change lanes by leaving the key for that lane blank. The vehicle should move to the nearest valid lane.&lt;br /&gt;
&lt;br /&gt;
===Making a simple Autobahn Road section===&lt;br /&gt;
A simple section sets the &amp;quot;lane rotation&amp;quot; setting to blank and allows the vehicle to decide what direction to drive in the lanes. This allows for existing roads to updated to use the autobahn system by dropping a script into them. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 Name &amp;quot;&amp;quot; &amp;quot;PublicRoad;0;1;20;Simple Road;&amp;quot; + (string)(llGetPos() + &amp;lt;0.,0.,1.5&amp;gt;) + &amp;quot;;&amp;quot; + (string)NextKey; &amp;quot;&amp;quot; &lt;br /&gt;
where the key is the key of the next prim.&lt;br /&gt;
&lt;br /&gt;
===Making a Autobahn Road section===&lt;br /&gt;
Getting the rotation correct is important since the vehicle uses this to orientate itself on to the road.&lt;br /&gt;
&lt;br /&gt;
Since the name actually controls the road direction, you can make the prim any direction and modify the road update script&lt;br /&gt;
&lt;br /&gt;
===Scripts===&lt;br /&gt;
This script works as long as the forward direction is correct for the scanner to see the next road segment.&lt;br /&gt;
&lt;br /&gt;
# The self replicating road script updates the road and leaves the road unscripted using llSetRemoteScriptAccessPin.  It allows you to remove them using the &amp;quot;/65 remove&amp;quot; command and then allows you to update them again by dropping the script into one prim and giving it the &amp;quot;/65 update&amp;quot; command.  The settings are stored in the names of the inventory items.&lt;br /&gt;
#The car script uses a scanner to find the first prim and then uses llKey2Name to navigate.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
 The vector and keys are at the end since the update script can replace them when the the editor truncates them. &lt;br /&gt;
As of 1.13 the editor truncates the name field to fit in the edit box when the prim it edited.&lt;br /&gt;
&lt;br /&gt;
Pipe symbols and other symbols don&amp;#039;t work in the description field since it&amp;#039;s like a filename (V1.12)&lt;br /&gt;
As of 1.12 you can&amp;#039;t read the description of other objects! So the protocol only uses the name&lt;/div&gt;</summary>
		<author><name>Grumble Loudon</name></author>
	</entry>
</feed>