<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Blueman+Steele</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Blueman+Steele"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Blueman_Steele"/>
	<updated>2026-07-28T20:24:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_101/Integers&amp;diff=497913</id>
		<title>LSL 101/Integers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_101/Integers&amp;diff=497913"/>
		<updated>2009-09-29T12:59:18Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:LSL 101]]&lt;br /&gt;
{{NavNextPrev|prev=Strings and Simple Output|next=The touch_start Event}}&lt;br /&gt;
&lt;br /&gt;
Integers are another data type found in LSL along with Strings. LSL can handle whole numbers from −2,147,483,648 to +2,147,483,647.  Integers can either be represented literally in a script or placed within a [https://wiki.secondlife.com/wiki/LSL_101/Variables variable] at runtime. Integers can use the following mathematial operations.&lt;br /&gt;
&lt;br /&gt;
* + add&lt;br /&gt;
* - subtract&lt;br /&gt;
* * multiply&lt;br /&gt;
* / divide&lt;br /&gt;
* % modulus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be able to print these numbers however, you&#039;ll need to [https://wiki.secondlife.com/wiki/Typecast typcast] then into a string. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, (string)5 );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why do we preface the number 5 with (string)?  llSay is only expecting a string and will not be able to print a number without you [https://wiki.secondlife.com/wiki/Typecast typcasting] it first. We can do the following.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;5&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, 5 is represented as a string so no typecasting is needed. However in this form it&#039;s not really the integer 5. If it&#039;s not an integer, you won&#039;t be able to perform math on the number. Here&#039;s an example where math is performed before printing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, (string)(2+3) );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With some [https://wiki.secondlife.com/wiki/LSL_101/String_Concatenation string concatenation] you can combine two strings (including typecast numbers) to help label the output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;two plus three equals &amp;quot; + (string)(2 + 3) );&lt;br /&gt;
        llSay(0, &amp;quot;100 minus 1 equals &amp;quot; + (string)(100 - 1) );&lt;br /&gt;
        llSay(0, &amp;quot;5 times 5 equals &amp;quot; + (string)(5 * 5) );&lt;br /&gt;
        llSay(0, &amp;quot;six divides in twelve &amp;quot; + (string)(12 / 6) + &amp;quot; times.&amp;quot; );&lt;br /&gt;
        llSay(0, &amp;quot;20 divided by 7 equals &amp;quot; + (string)(20 / 7) + &amp;quot; with a remainder of &amp;quot; + (string)(20 % 7));&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_101/Integers&amp;diff=497903</id>
		<title>LSL 101/Integers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_101/Integers&amp;diff=497903"/>
		<updated>2009-09-29T12:58:16Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:LSL 101]]&lt;br /&gt;
{{NavNextPrev|prev=Strings and Simple Output|next=The touch_start Event}}&lt;br /&gt;
&lt;br /&gt;
Integers are another data type found in LSL along with Strings. LSL can handle whole numbers from −2,147,483,648 to +2,147,483,647.  Integers can either be represented literally in a script or placed within a [https://wiki.secondlife.com/wiki/LSL_101/Variables variable] at runtime. Integers can use the following mathematial operations.&lt;br /&gt;
&lt;br /&gt;
+ add&lt;br /&gt;
- subtract&lt;br /&gt;
* multiply&lt;br /&gt;
/ divide&lt;br /&gt;
% modulus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be able to print these numbers however, you&#039;ll need to [https://wiki.secondlife.com/wiki/Typecast typcast] then into a string. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, (string)5 );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why do we preface the number 5 with (string)?  llSay is only expecting a string and will not be able to print a number without you [https://wiki.secondlife.com/wiki/Typecast typcasting] it first. We can do the following.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;5&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the example above, 5 is represented as a string so no typecasting is needed. However in this form it&#039;s not really the integer 5. If it&#039;s not an integer, you won&#039;t be able to perform math on the number. Here&#039;s an example where math is performed before printing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, (string)(2+3) );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With some [https://wiki.secondlife.com/wiki/LSL_101/String_Concatenation string concatenation] you can combine two strings (including typecast numbers) to help label the output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;two plus three equals &amp;quot; + (string)(2 + 3) );&lt;br /&gt;
        llSay(0, &amp;quot;100 minus 1 equals &amp;quot; + (string)(100 - 1) );&lt;br /&gt;
        llSay(0, &amp;quot;5 times 5 equals &amp;quot; + (string)(5 * 5) );&lt;br /&gt;
        llSay(0, &amp;quot;six divides in twelve &amp;quot; + (string)(12 / 6) + &amp;quot; times.&amp;quot; );&lt;br /&gt;
        llSay(0, &amp;quot;20 divided by 7 equals &amp;quot; + (string)(20 / 7) + &amp;quot; with a remainder of &amp;quot; + (string)(20 % 7));&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_101/Integers&amp;diff=497893</id>
		<title>LSL 101/Integers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_101/Integers&amp;diff=497893"/>
		<updated>2009-09-29T12:42:21Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:LSL 101]]&lt;br /&gt;
{{NavNextPrev|prev=Strings and Simple Output|next=The touch_start Event}}&lt;br /&gt;
&lt;br /&gt;
Integers are whole numbers from −2,147,483,648 and +2,147,483,647.  Integers can be represented literally in a scripts or placed within a [https://wiki.secondlife.com/wiki/LSL_101/Variables variable] at runtime. To be able to see these numbers however, you&#039;ll need to [https://wiki.secondlife.com/wiki/Typecast typcast] then into a string. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, (string)5 );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why do we preface the number 5 with (string)?  llSay is only expecting a string and will not be able to print a number without you [https://wiki.secondlife.com/wiki/Typecast typcasting] it first. We can do the following.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;5&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here 5 is represented as a string so no typecasting is needed. However in this form it&#039;s not really the integer 5 (which can be added and subtracted). Here&#039;s an example where math is performed before printing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, (string)(2+3) );&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSensor&amp;diff=291643</id>
		<title>LlSensor</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSensor&amp;diff=291643"/>
		<updated>2009-03-24T16:00:04Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/object|id|object or avatar|sim=*}}{{#vardefine:constants_nb|{{LSL Constants/Sensing|type}}}}{{LSL_Function&lt;br /&gt;
|func_id=28|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|sort=Sensor|func=llSensor&lt;br /&gt;
|func_desc=Performs a single scan for &#039;&#039;&#039;name&#039;&#039;&#039; and &#039;&#039;&#039;id&#039;&#039;&#039; with &#039;&#039;&#039;type&#039;&#039;&#039; within &#039;&#039;&#039;range&#039;&#039;&#039; meters and &#039;&#039;&#039;arc&#039;&#039;&#039; radians of forward vector&lt;br /&gt;
|p1_type=string|p1_name=name|p1_desc=object or avatar name&lt;br /&gt;
|p2_type=key|p2_name=id|p2_desc=&lt;br /&gt;
|p3_type=integer|p3_name=type|p3_desc=mask ({{#var:AGENT}}, {{#var:ACTIVE}}, {{#var:PASSIVE}}, and/or {{#var:SCRIPTED}})|p3_hover=mask (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED)&lt;br /&gt;
|p4_type=float|p4_name=range|p4_desc=range 0.0 to 96.0m&lt;br /&gt;
|p5_type=float|p5_name=arc|p5_desc=the max angle between the local x-axis of the prim and detectable objects, range 0.0 to {{#var:PI}}|p5_hover=the max angle between the local x-axis of the prim and detectable objects, range 0.0 to PI&lt;br /&gt;
|func_footnote=If &#039;&#039;&#039;name&#039;&#039;&#039; or &#039;&#039;&#039;id&#039;&#039;&#039; is empty then that empty constraint is ignored.&amp;lt;br/&amp;gt;If &#039;&#039;&#039;id&#039;&#039;&#039; is an invalid key or [[NULL_KEY]] it is treated as empty.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
*Attachments cannot not detect their wearer (this includes HUD attachments).&lt;br /&gt;
*If &#039;&#039;&#039;type&#039;&#039;&#039; is zero, the sensor will silently fail, neither [[sensor]] or [[no_sensor]] will be triggered.&lt;br /&gt;
*Only 16 objects will be scanned each time.&lt;br /&gt;
|examples=&lt;br /&gt;
This sensor scans a 45 degree cone about the x-axis.  ([[PI]]/2 or [[PI_BY_TWO]] scans a hemisphere. [[PI]] is a spherical scan.)&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSensor( &amp;quot;Gigs Taggart&amp;quot;, NULL_KEY, AGENT, 96.0, PI/4 );&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sensor detects all prims and agents with a given name within 15m of the sensor.  (AGENT, PASSIVE and ACTIVE behave inclusively.  SCRIPTED is not inclusive and will exclude non-scripted targets (like avatars) from the detected set.)&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSensor( &amp;quot;&amp;quot;, NULL_KEY, ( AGENT | PASSIVE | ACTIVE ), 15.0, PI );&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llSensorRepeat]]| Runs a sensor on a timer}}&lt;br /&gt;
{{LSL DefineRow||[[llSensorRemove]]| Stops the llSensorRepeat timer}}&lt;br /&gt;
|also_events=&lt;br /&gt;
{{LSL DefineRow||[[sensor]]|Triggered when a sensor detects something}}&lt;br /&gt;
{{LSL DefineRow||[[no_sensor]]|Triggered when a sensor detects nothing}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|cat1=Sensor&lt;br /&gt;
|cat2=Detected&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:Getting_started_with_LSL&amp;diff=44990</id>
		<title>Talk:Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:Getting_started_with_LSL&amp;diff=44990"/>
		<updated>2007-12-17T13:55:00Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;;Question: Is there a reason the code isn&#039;t indented? I badly whitespaced code makes it hard to sit still; like walking into someones house and finding a picture hanging crooked on the wall. Maybe whitespace should be mentioned somewhere in the article too... [[User:Strife Onizuka|Strife Onizuka]] 09:41, 1 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
;Answer: I didn&#039;t want to touch the indentation until we got syntax highlighting, (which is here now, wow took 10 months) I&#039;ll clean these up -- [[User:Blueman Steele|Blueman Steele]] 05:50, 17 December 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Note: Moved the page, it&#039;s all the rage to have spaces in names. As to the capitalization of the name thats not my can of worms. [[User:Strife Onizuka|Strife Onizuka]] 09:46, 1 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Question: Code sample doesn&#039;t match what the article is saying. &amp;quot;The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&amp;quot;  Where&#039;s the two comments?&lt;br /&gt;
&lt;br /&gt;
;Answer: Fixed it, I had the idea of commenting the code but decided instead to show it in its original form. -- [[User:Blueman Steele|Blueman Steele]] 05:46, 17 December 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Question: RESET SCRIPTS IN SELECTION&amp;quot; etc. is greyed out How do I activate these options ?&lt;br /&gt;
&lt;br /&gt;
;Answer: Could be a number of things including permissions or if you have the right object (or sub object selected) [[User:Blueman Steele|Blueman Steele]] 05:54, 17 December 2007 (PST)&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:Getting_started_with_LSL&amp;diff=44989</id>
		<title>Talk:Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:Getting_started_with_LSL&amp;diff=44989"/>
		<updated>2007-12-17T13:45:54Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Code sample doesn&amp;#039;t match what the article is saying */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is there a reason the code isn&#039;t indented? I badly whitespaced code makes it hard to sit still; like walking into someones house and finding a picture hanging crooked on the wall. Maybe whitespace should be mentioned somewhere in the article too... [[User:Strife Onizuka|Strife Onizuka]] 09:41, 1 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
Moved the page, it&#039;s all the rage to have spaces in names. As to the capitalization of the name thats not my can of worms. [[User:Strife Onizuka|Strife Onizuka]] 09:46, 1 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
* Code sample doesn&#039;t match what the article is saying &lt;br /&gt;
&lt;br /&gt;
&amp;quot;The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Where&#039;s the two comments?&lt;br /&gt;
&lt;br /&gt;
Fixed it, I had the idea of commenting the code but decided instead to show it in its original form. -- [[User:Blueman Steele|Blueman Steele]] 05:46, 17 December 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== RESET SCRIPTS IN SELECTION&amp;quot; etc. is greyed out ==&lt;br /&gt;
&lt;br /&gt;
How do I activate these options ?&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44988</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44988"/>
		<updated>2007-12-17T13:42:44Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Dissecting &amp;quot;Hello World&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Development Cycle ==&lt;br /&gt;
&lt;br /&gt;
(aka Wash / Rinse / Repeat)&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
===WHY STOP AND START?===&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== Dissecting &amp;quot;Hello World&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
===STATES===&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EVENTS===&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FUNCTIONS===&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
=== Putting it all together ===&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
default   // All Scripts need a Default State&lt;br /&gt;
&lt;br /&gt;
{ // this open curly bracket denotes the start of the state&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&#039;s curly braces&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself. &lt;br /&gt;
&lt;br /&gt;
=== On/Off Example Using States ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
=== Default State ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered. Which is this case in entered the first time the script is run.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44987</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44987"/>
		<updated>2007-12-17T13:36:10Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* A closer look */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Development Cycle ==&lt;br /&gt;
&lt;br /&gt;
(aka Wash / Rinse / Repeat)&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
===WHY STOP AND START?===&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== Dissecting &amp;quot;Hello World&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
===STATES===&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EVENTS===&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FUNCTIONS===&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
=== Putting it all together ===&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
default   // All Scripts need a Default State&lt;br /&gt;
&lt;br /&gt;
{ // this open curly bracket denotes the start of the state&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&#039;s curly braces&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself. &lt;br /&gt;
&lt;br /&gt;
=== On/Off Example Using States ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
=== Default State ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered. Which is this case in entered the first time the script is run.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44986</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44986"/>
		<updated>2007-12-17T13:35:00Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Introducing States and Events */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Development Cycle ==&lt;br /&gt;
&lt;br /&gt;
(aka Wash / Rinse / Repeat)&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
===WHY STOP AND START?===&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== Dissecting &amp;quot;Hello World&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
===STATES===&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EVENTS===&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FUNCTIONS===&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
=== Putting it all together ===&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
default   // All Scripts need a Default State&lt;br /&gt;
&lt;br /&gt;
{ // this open curly bracket denotes the start of the state&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&#039;s curly braces&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself. &lt;br /&gt;
&lt;br /&gt;
=== On/Off Example Using States ===&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44985</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44985"/>
		<updated>2007-12-17T13:32:14Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Putting it all together */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Development Cycle ==&lt;br /&gt;
&lt;br /&gt;
(aka Wash / Rinse / Repeat)&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
===WHY STOP AND START?===&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== Dissecting &amp;quot;Hello World&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
===STATES===&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EVENTS===&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FUNCTIONS===&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
=== Putting it all together ===&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
default   // All Scripts need a Default State&lt;br /&gt;
&lt;br /&gt;
{ // this open curly bracket denotes the start of the state&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&#039;s curly braces&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44984</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44984"/>
		<updated>2007-12-17T13:31:10Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* A Closer Look */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Development Cycle ==&lt;br /&gt;
&lt;br /&gt;
(aka Wash / Rinse / Repeat)&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
===WHY STOP AND START?===&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== Dissecting &amp;quot;Hello World&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
===STATES===&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EVENTS===&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FUNCTIONS===&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
default   // All Scripts need a Default State&lt;br /&gt;
&lt;br /&gt;
{ // this open curly bracket denotes the start of the state&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&#039;s curly braces&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44983</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44983"/>
		<updated>2007-12-17T13:27:19Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Wash / Rinse / Repeat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Development Cycle ==&lt;br /&gt;
&lt;br /&gt;
(aka Wash / Rinse / Repeat)&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
===WHY STOP AND START?===&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
===STATES===&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EVENTS===&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FUNCTIONS===&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
default   // All Scripts need a Default State&lt;br /&gt;
&lt;br /&gt;
{ // this open curly bracket denotes the start of the state&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&#039;s curly braces&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44982</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44982"/>
		<updated>2007-12-17T13:25:27Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* A Closer Look */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
===STATES===&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EVENTS===&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FUNCTIONS===&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
default   // All Scripts need a Default State&lt;br /&gt;
&lt;br /&gt;
{ // this open curly bracket denotes the start of the state&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&#039;s curly braces&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44981</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44981"/>
		<updated>2007-12-17T13:21:28Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Putting it all together */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
default   // All Scripts need a Default State&lt;br /&gt;
&lt;br /&gt;
{ // this open curly bracket denotes the start of the state&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&#039;s curly braces&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44980</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44980"/>
		<updated>2007-12-17T13:19:49Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* A Closer Look */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)  // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event (between curly braces)&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
// end of default state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. Copy and paste this to a new script to see it color coded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// All Scripts need a Default State&lt;br /&gt;
default&lt;br /&gt;
// this open curly bracket denotes the start of the state&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    // another curly bracket starts the  body of the event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44979</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44979"/>
		<updated>2007-12-17T13:18:11Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* What is LSL? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event&lt;br /&gt;
     }&lt;br /&gt;
     // end of event&lt;br /&gt;
}&lt;br /&gt;
// end of state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. Copy and paste this to a new script to see it color coded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// All Scripts need a Default State&lt;br /&gt;
default&lt;br /&gt;
// this open curly bracket denotes the start of the state&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    // another curly bracket starts the  body of the event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44978</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=44978"/>
		<updated>2007-12-17T13:15:08Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FOR WHOM IS THIS TUTORIAL:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life.  LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own.  You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the [[touch_start]]() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(note: all scripts will be placed in LSL tags when it goes active)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &#039;&#039;&#039;create&#039;&#039;&#039; (for one button macs use command+click).&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &#039;&#039;&#039;wand&#039;&#039;&#039; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &#039;&#039;&#039;edit&#039;&#039;&#039; mode and an edit window will pop up. To place a script in an existing object, right click it and hit edit to open the edit window.&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &#039;&#039;&#039;more&amp;gt;&amp;gt;&amp;gt;&#039;&#039;&#039; click it to reveal five tabs marked &#039;&#039;&#039;general&#039;&#039;&#039;, &#039;&#039;&#039;object&#039;&#039;&#039;, &#039;&#039;&#039;features&#039;&#039;&#039;, &#039;&#039;&#039;content&#039;&#039;&#039;, and &#039;&#039;&#039;texture&#039;&#039;&#039;. Click &#039;&#039;&#039;content&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &#039;&#039;&#039;new script&#039;&#039;&#039; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &#039;&#039;&#039;save&#039;&#039;&#039; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot; The &amp;quot;edit&amp;quot; building window must be closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed (resurrected) again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and resetting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car...while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
         llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
// contents of state go here&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
state playing&lt;br /&gt;
{&lt;br /&gt;
// this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;[[state_entry]]&amp;quot; which is triggered by the state being entered, and &amp;quot;[[touch_start]]&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// Code start&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     // this is an event&lt;br /&gt;
     {&lt;br /&gt;
     // this is the content of the event&lt;br /&gt;
     }&lt;br /&gt;
     // end of event&lt;br /&gt;
}&lt;br /&gt;
// end of state&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lowercase Ls. We&#039;ve seen [[llSay]]() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. Copy and paste this to a new script to see it color coded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// All Scripts need a Default State&lt;br /&gt;
default&lt;br /&gt;
// this open curly bracket denotes the start of the state&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // an event&lt;br /&gt;
    // another curly bracket starts the  body of the event&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&lt;br /&gt;
    }&lt;br /&gt;
    // closed curly bracket closes the state_entry event&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
    }&lt;br /&gt;
    // end of touch start&lt;br /&gt;
}&lt;br /&gt;
// Code end&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;[[state_entry]]&amp;quot; event which in turn runs the function [[llSay]]() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;[[touch_start]]&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default //default state is mandatory&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // runs each time the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
        llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
        // note the semicolons at the end of each instruction (do not put them at the end of if statements)&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
    {&lt;br /&gt;
        state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
} // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    state_entry() // this is run as soon as the state is entered&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
        llSetColor(&amp;lt;0.0, 0.0, 0.0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;[[default]]&amp;quot; all new states begin with the word &amp;quot;[[state]]&amp;quot;. Also, while the object has a texture, the color will affect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;[[state_entry]]&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSay(0, &amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetColor(&amp;lt;1.0, 1.0, 1.0&amp;gt;, ALL_SIDES);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;[[touch_start]]&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;state off;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[llWhisper]]( ) is just like [[llSay]]( ) but only broadcasts at half the distance. You still must state what channel. So...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llWhisper(0,&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using [[llShout]]( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
[[llOwnerSay]]( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay(&amp;quot;turning on!&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via [[llSetText]]( ) like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1.0, 1.0, 1.0&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1.0, 1.0, 1.0&amp;gt; means &amp;quot;white&amp;quot; and &amp;lt;0.0, 0.0, 0.0&amp;gt; means &amp;quot;black&amp;quot;. Replace the [[llSay]](0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;,1.0);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now than you can edit and run LSL code, move on to one of the more advanced [[LSL_Tutorial|LSL Tutorial]]s.&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetAlpha&amp;diff=38766</id>
		<title>LlSetAlpha</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetAlpha&amp;diff=38766"/>
		<updated>2007-11-01T15:05:52Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/face|face}} {{LSL_Function/alpha|alpha}} {{LSL_Function&lt;br /&gt;
|func_id=51|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llSetAlpha|sort=SetAlpha&lt;br /&gt;
|p1_type=float|p1_name=alpha&lt;br /&gt;
|p2_type=integer|p2_name=face&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Sets the &#039;&#039;&#039;alpha&#039;&#039;&#039; on &#039;&#039;&#039;face&#039;&#039;&#039;&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;pre&amp;gt;&lt;br /&gt;
float cloakSpeed = .1;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        integer x;&lt;br /&gt;
        float xf;&lt;br /&gt;
        for (x=9; x&amp;gt;0; x--)&lt;br /&gt;
        {&lt;br /&gt;
            xf = x * .1;&lt;br /&gt;
            llSleep(cloakSpeed);&lt;br /&gt;
            llSetAlpha(xf,ALL_SIDES);      &lt;br /&gt;
        }&lt;br /&gt;
        state cloaked;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
state cloaked&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        integer x;&lt;br /&gt;
        float xf;&lt;br /&gt;
        for (x=1; x&amp;lt;11; x++)&lt;br /&gt;
        {&lt;br /&gt;
            xf = x * .1;&lt;br /&gt;
            llSleep(cloakSpeed);&lt;br /&gt;
            llSetAlpha(xf,ALL_SIDES);  &lt;br /&gt;
        }&lt;br /&gt;
        state default;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetAlpha]]|Gets the prim&#039;s alpha}}&lt;br /&gt;
{{LSL DefineRow||[[llGetColor]]|Gets the prim&#039;s color}}&lt;br /&gt;
{{LSL DefineRow||[[llSetColor]]|Sets the prim&#039;s color}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkColor]]|Sets link&#039;s color}}&lt;br /&gt;
{{LSL DefineRow||[[llSetLinkAlpha]]|Sets link&#039;s alpha}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events=&lt;br /&gt;
{{LSL DefineRow||[[changed]]|[[CHANGED_COLOR]]}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|deprecated&lt;br /&gt;
|cat1&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetPizza&amp;diff=15736</id>
		<title>LlGetPizza</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetPizza&amp;diff=15736"/>
		<updated>2007-03-20T08:48:22Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id|func_sleep=1800|func_energy=10.0&lt;br /&gt;
|mode=request|func=llPizza|sort=Pizza&lt;br /&gt;
|func_desc=Order pizza while logged into Second Life.&lt;br /&gt;
|p1_type=key|p1_name=destination|p1_desc=Avatar [[UUID]].&lt;br /&gt;
|func_footnote=The avatar &#039;&#039;&#039;destination&#039;&#039;&#039; does not have to be in the same sim, but should be close by to reduce delivery latency.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=...or your money back! (Successful  delivery may cause user to sleep too)&lt;br /&gt;
|examples=&amp;lt;pre&amp;gt;&lt;br /&gt;
llPizza(llGetOwner());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|related&lt;br /&gt;
|also&lt;br /&gt;
|notes=A long time feature of a popular MMO.  Should be added to Second Life to keep up.}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category:LSL_Color&amp;diff=14679</id>
		<title>Category:LSL Color</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category:LSL_Color&amp;diff=14679"/>
		<updated>2007-03-05T16:44:27Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: added/rearranged colors (orange and violet forthcoming)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header&lt;br /&gt;
}}{{#vardefine:header_title|Color in LSL&lt;br /&gt;
}}{{#vardefine:header_text|LSL has it&#039;s own special format for color. LSL uses a [[vector]] to store color. Unlike traditional RGB where each channel is 0 -&amp;amp;gt; 255, LSL&#039;s color channels are 0 -&amp;amp;gt; 1.&amp;lt;br/&amp;gt;&lt;br /&gt;
===Format: {{LSL VR|&#039;&#039;&#039;R&#039;&#039;&#039;|&#039;&#039;&#039;G&#039;&#039;&#039;|&#039;&#039;&#039;B&#039;&#039;&#039;}}===&lt;br /&gt;
{{{!}}&lt;br /&gt;
{{LSL DefineRow|float|x|Red value|[0, 1]}}&lt;br /&gt;
{{LSL DefineRow|float|y|Green value|[0, 1]}}&lt;br /&gt;
{{LSL DefineRow|float|z|Blue value|[0, 1]}}&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
}}{{#vardefine:helpers|&lt;br /&gt;
===Useful functions for storing/retrieving color and alpha values to/from integers===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integer ColorAlphatoRGBA(vector color, float alpha) {&lt;br /&gt;
	return (((integer)(alpha * 255.0) &amp;amp; 0xFF) &amp;lt;&amp;lt; 24) |&lt;br /&gt;
		(((integer)(color.x * 255.0) &amp;amp; 0xFF) &amp;lt;&amp;lt; 16) |&lt;br /&gt;
		(((integer)(color.y * 255.0) &amp;amp; 0xFF) &amp;lt;&amp;lt; 8) |&lt;br /&gt;
		((integer)(color.z * 255.0) &amp;amp; 0xFF);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
vector RGBAtoColor(integer rgba) {&lt;br /&gt;
	return &amp;lt; ((rgba &amp;gt;&amp;gt; 16) &amp;amp; 0xFF) / 255.0, ((rgba &amp;gt;&amp;gt; 8) &amp;amp; 0xFF) / 255.0, (rgba &amp;amp; 0xFF) / 255.0 &amp;gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
float RGBAtoAlpha(integer rgba) {&lt;br /&gt;
	return ((rgba &amp;gt;&amp;gt; 24) &amp;amp; 0xFF) / 255.0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}{{#vardefine:examples|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vector white = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
vector grey = &amp;lt;0.5, 0.5, 0.5&amp;gt;;&lt;br /&gt;
vector black = &amp;lt;0.0, 0.0, 0.0&amp;gt;;&lt;br /&gt;
vector red = &amp;lt;1.0, 0.0, 0.0&amp;gt;;&lt;br /&gt;
vector green = &amp;lt;0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
vector blue = &amp;lt;0.0, 0.0, 1.0&amp;gt;;&lt;br /&gt;
vector yellow = &amp;lt;1.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
vector cyan = &amp;lt;0.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
vector magenta = &amp;lt;1.0, 0.0, 1.0&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}{{LSL Generic}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Useful_Function_WishList&amp;diff=14678</id>
		<title>Talk:LSL Useful Function WishList</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Useful_Function_WishList&amp;diff=14678"/>
		<updated>2007-03-05T16:29:15Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Useful/Joke Functions ==&lt;br /&gt;
I have been noticing that some of the &amp;quot;feature request&amp;quot; functions are here only as documentation of a funny idea someone had.  IMHO these joke functions (and some are really funny, don&#039;t get me wrong,) should be organized into a different category/page.  That would allow for less clutter and make it more likely that useful suggestions would be seen by the eyes of those who have tha ability to implement them.  Does anyone else concur or disagree? [[User:Cron Stardust|Cron Stardust]] 15:52, 4 March 2007 (PST)&lt;br /&gt;
:I really really don&#039;t like joke functions. I don&#039;t think they should be on the wiki at all. It&#039;s not that I don&#039;t appreciate humor, it&#039;s just that I don&#039;t want LL wasting their time processing requests for joke functions. If we treat things like a joke, then LL will not take the wiki seriously; the effect will be a loss of influence. [[User:Strife Onizuka|Strife Onizuka]] 21:04, 4 March 2007 (PST)&lt;br /&gt;
::That was why I suggested a different page/template for them.  No-one can prevent them being added, but why have them dilute this space when they can be put in a slightly different category. :D [[User:Cron Stardust|Cron Stardust]] 21:29, 4 March 2007 (PST)&lt;br /&gt;
:::I&#039;ll make up a new modifier-template, it&#039;s not a time consuming task. Or maybe, make it a mode of the request template. [[User:Strife Onizuka|Strife Onizuka]] 22:28, 4 March 2007 (PST)&lt;br /&gt;
:My &amp;quot;llPizza&amp;quot; is nearly both.  If we had to remove humor to achieve better focus I&#039;m all for it.  However I would welcome the idea of two separate areas.  We are talking about a program with an easter egg of &amp;quot;hippos&amp;quot;. I think humor is a huge part of Second Life.[[User:Blueman Steele|Blueman Steele]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Weapon&amp;diff=12767</id>
		<title>Weapon</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Weapon&amp;diff=12767"/>
		<updated>2007-02-23T07:04:36Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: Modified towards &amp;quot;neutral&amp;quot; tone required by the Wiki.  Removed TOS violating subjects.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Weapon Types ===&lt;br /&gt;
&lt;br /&gt;
There are hundreds of weapons in Second Life to choose from. They can be classified in several categories:&lt;br /&gt;
&lt;br /&gt;
*Basic Guns - Guns that fire basic physical bullets. These bullets are stopped by most quality shield systems.&lt;br /&gt;
*Advanced &amp;quot;Guns&amp;quot; - Guns that fire tracking, non-physical bullets. These can&#039;t be stopped by all but the most advanced (and expensive) defense systems.&lt;br /&gt;
*Explosives and &amp;quot;Nukes&amp;quot; - These range from basic explosives to nukes that can kill everyone (if in a damage enabled area) within 96m of the detonation point.&lt;br /&gt;
*HUD Weapons - There are several quality HUD based combat systems available.&lt;br /&gt;
*Robots and Turrets - These can be remote controlled, or set to fire on certain targets automatically.&lt;br /&gt;
*Annoying Crap - Stuff like caging guns, anything that flings people into the air. Considered &amp;quot;noobish&amp;quot; and frowned upon by experienced combat people.&lt;br /&gt;
&lt;br /&gt;
For more information, see [[Combat]]&lt;br /&gt;
&lt;br /&gt;
=== Weapon Damage ===&lt;br /&gt;
&lt;br /&gt;
Weapons in Second Life can inflict the following types of [[damage]].&lt;br /&gt;
&lt;br /&gt;
* Kill with one hit&lt;br /&gt;
* Partial [[damage]] from physical bullets&lt;br /&gt;
* Push&lt;br /&gt;
* Shieldbreaker&lt;br /&gt;
* Caging - can confine an avatar&lt;br /&gt;
&lt;br /&gt;
=== Weapon Quality ===&lt;br /&gt;
&lt;br /&gt;
Free weapons tend to be badly scripted such that they cause lag and other problems. Second Life weapons are a case where you really do get what you pay for.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials|Combat]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Help:Weapons in Second Life]]&lt;br /&gt;
* [[Damage]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=12403</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=12403"/>
		<updated>2007-02-22T19:00:16Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: grammar change&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHO THIS TUTORIAL IS FOR:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life. LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own. You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. A script in Second Life is a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL special is its emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life behaviors can be modeled with &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life, but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). For example, when an avatar touches an object, a &#039;&#039;touch_start&#039;&#039; message is sent to the object, which causes the touch_start() event handler to begin executing.  So the minimum LSL program must have one state with one event handler in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(note: all scripts will be placed in LSL tags when it goes active)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &amp;quot;create&amp;quot;. (for one button macs use command+click)&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &amp;quot;wand&amp;quot; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &amp;quot;edit&amp;quot; mode and an edit window will pop up.&lt;br /&gt;
(Note: to place a script in an existing object, right click it and hit edit to open the edit window.)&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &amp;quot;more&amp;gt;&amp;gt;&amp;gt;&amp;quot; click it to reveal five tabs marked general, object, features, content, and texture. Click &amp;quot;content&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &amp;quot;new script&amp;quot; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &amp;quot;save&amp;quot; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot;&lt;br /&gt;
(make sure the &amp;quot;edit&amp;quot; building window is closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and reseting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car.... while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 // contents of state go here&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state playing&lt;br /&gt;
 {&lt;br /&gt;
 // this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;state_entry&amp;quot; which is triggered by the state being entered, and &amp;quot;touch_start&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 // Code start&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      // this is an event&lt;br /&gt;
      {&lt;br /&gt;
      // this is the content of the event&lt;br /&gt;
      }&lt;br /&gt;
      // end of event&lt;br /&gt;
 }&lt;br /&gt;
 // end of state&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lower case L&#039;s. We&#039;ve seen llSay() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. Copy and paste this to a new script to see it color coded.&lt;br /&gt;
&lt;br /&gt;
 // All Scripts need a Default State&lt;br /&gt;
 default&lt;br /&gt;
 // this open curly bracket denotes the start of the state&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // an event&lt;br /&gt;
      // another curly bracket starts the  body of the event&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&lt;br /&gt;
      }&lt;br /&gt;
      // closed curly bracked closes the state_entry event&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
      }&lt;br /&gt;
      // end of touch start&lt;br /&gt;
 }&lt;br /&gt;
 // Code end&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;state_entry&amp;quot; event which in turn runs the function llSay() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;touch_start&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Lets look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
 default //default state is mandatory&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // runs each time the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
      llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
      // note the semicolons at the end of each instruction.&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
      {&lt;br /&gt;
      state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
 } // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
 state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // this is run as soon as the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
      llSetColor(&amp;lt;0,0,0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      state default;&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;default&amp;quot; all new states begin with the word &amp;quot;state&amp;quot;. Also, while the object has a texture, the color will effect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;state_entry&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
 [[LSL_llSay|llSay]](0, &amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
 llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES);&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1&#039;s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;touch_start&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
 state off;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
llWhisper( ) is just like llSay( ) but only broadcasts at half the distance. You still must state what channel. So....&lt;br /&gt;
&lt;br /&gt;
 llWhisper(0,&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using llShout( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
llOwnerSay( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
 llOwnerSay(&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via llSetText( ) like this.&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1,1,1&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1,1,1&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0,0,0&amp;gt; means &amp;quot;black&amp;quot;. Replace the llSay(0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0,0,0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life&amp;diff=9620</id>
		<title>Getting started in Second Life</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life&amp;diff=9620"/>
		<updated>2007-02-11T11:13:48Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is an experiment of the multi-language set up, please do not edit this page.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page is being translated into Spanish. [[https://wiki.secondlife.com/wiki/Help:Getting_started_in_Second_Life/es | Link]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quick Tips for Second Life ==&lt;br /&gt;
&lt;br /&gt;
Lost? Confused? Both?!  This card will be your guide to getting started in Second Life. Check the bottom of the card for links to more help.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The first things you should learn ==&lt;br /&gt;
&lt;br /&gt;
There is a lot to learn about Second Life, but here is the minimum you need to get started.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Movement --&#039;&#039;&#039;&lt;br /&gt;
Movement includes walking, running, and flying.  To walk forward, backwards and turn left and right you can use the arrow keys.  You can also do the same with the letters WASD on your keyboard. Pressing CTRL + R will toggle if you are running or not.  Hold shift to strafe sideways.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Flying --&#039;&#039;&#039;&lt;br /&gt;
To fly, you can hit the blue fly button at the bottom of your screen, or hit F, or press and hold the Page Up key. Once airborne,  you can use either Page Up and Page Down to rise and fall, or E and C on your keyboard. Tapping those will make you jump.  Hit the Home key or F again or &amp;quot;stop flying&amp;quot; to do just that.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Focus --&#039;&#039;&#039; &lt;br /&gt;
If you notice that some keys work differently when you are chatting, it&#039;s due to focus.  Where you last click can change the WASD keys to only let you type.  To restore focus to movement, hit ESC up to 3 times or click once on the ground in front of you.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Camera Control --&#039;&#039;&#039;&lt;br /&gt;
Click and drag on your back to take a look around.  ALT+click and drag on an object to zoom in and out and pan around it.  CTRL+ALT+click and drag to &amp;quot;orbit&amp;quot;.  CTRL+ALT+SHIFT+click and drag to pan left right up and down.  Hitting the esc key twice will reset your view.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Mouse Look --&#039;&#039;&#039;&lt;br /&gt;
Mouse look will have you see from your avatar&#039;s point of view and change your controls a little.  You will now strafe left and right and steer with the mouse. Hit M to enter mouse look and esc to get out of it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Communication --&#039;&#039;&#039;&lt;br /&gt;
Make sure you know how to Instant Message people you can see, and people  you can&#039;t see via your Search and Friends buttons.  Also make sure you get an idea of how far you can be &amp;quot;heard&amp;quot; when you chat or shout.  As you join groups, you will see that you can start chats with entire groups.  Gestures in your inventory are another way to communicate or add to what you say.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Interaction --&#039;&#039;&#039;&lt;br /&gt;
Interacting with objects is a big part of Second Life.  Have you tried sitting on poseballs?  Playing a game?  Buying and object? Make sure you know about the pie menu as well as when to right click or left click. If you have one mouse button, use CMD + click for right click.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- New Interactions --&#039;&#039;&#039;&lt;br /&gt;
While most actions still are accessable via right click.  Many can now happen with a left click.  For example, if you see a chair icon when you hover over an object, touching (left-clicking) it will automatically seat you.  Similar icons exist for buying, paying money to, and opening objects.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Objects and Inventory --&#039;&#039;&#039;&lt;br /&gt;
While not everyone builds in Second Life, it&#039;s a good idea to learn the basics of moving things in edit, attaching and detaching objects from your avatar, how to find things in your inventory, and how to &amp;quot;unpack&amp;quot; a box you may receive.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;-- Respect --&#039;&#039;&lt;br /&gt;
There is no set of rules to define respect, except to treat others as you would like to be treated. The ability to do something does not imply permission.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CONCEPTS OF THE MAIN LAND ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;-- Map and Teleporting --&#039;&#039;&lt;br /&gt;
The map lets you see nearly the whole world at once if you zoom out.  Each tiny square represents an area as big as help island.  Each one is a &amp;quot;simulator&amp;quot; (sim).  Second Life is at about 1600 sims as of January 2006.  Some are connected so that you can walk and fly between them.  Others are individual islands that can be reached only via teleport.  Walking or even flying everywhere would take hours.&lt;br /&gt;
&lt;br /&gt;
Double click on an area to be transported there,  you will either arrive there directly, or as close as possible and be given a red beacon to follow.  When you want to bring someone to a location, you can offer them a teleport via their profile.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Landmarks --&#039;&#039;&#039;&lt;br /&gt;
Landmarks are the Second Life equivalent of a bookmark.  They save a place that you or someone else has been.  You can find them in your inventory.  Double click them and you will get a teleport option as a pop up.  Create your own by pulling down the WORLD menu and choosing &amp;quot;Create Landmark Here&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Search --&#039;&#039;&#039;&lt;br /&gt;
Find will let you look up events, people, products, and also let you teleport to the various areas you find.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Friends --&#039;&#039;&#039;&lt;br /&gt;
As you explore you may make many friends.  When you offer friendship  it is reciprocal and gives the ability to see each other on the map. You can also offer a calling card instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;--  Damage Enabled Areas --&#039;&#039;&#039;&lt;br /&gt;
In certain areas you will see a heart and &amp;quot;100%&amp;quot; at the top of your screen.  This means you can take damage. If your health reaches zero you get sent back to where you have set as your &amp;quot;home&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== WHERE TO GET MORE HELP ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s best to get help where it&#039;s already offered.   Not everyone you meet in Second Life is experienced and knowledgeable in every area. Some people specialize. Others may be brand new, like yourself. If you missed Help Island or left too soon, a public version of Help Island exists.  Pressing on the links below should give you a landmark into your inventory.  Also listed are some other locations where people are happy to help you out.&lt;br /&gt;
&lt;br /&gt;
 : Island with tutorials &lt;br /&gt;
 : Classrooms and lots of help to be found&lt;br /&gt;
&lt;br /&gt;
If you have an immediate issue, pull dodwn the &amp;quot;Help&amp;quot; menu at the top of your screen and choose &amp;quot;Help Request&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life&amp;diff=9619</id>
		<title>Getting started in Second Life</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life&amp;diff=9619"/>
		<updated>2007-02-11T11:13:20Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is an experiment of the multi-language set up, please do not edit this page.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This page is being translated into Spanish. [[https://wiki.secondlife.com/wiki/Help:Getting_started_in_Second_Life/es| Link]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quick Tips for Second Life ==&lt;br /&gt;
&lt;br /&gt;
Lost? Confused? Both?!  This card will be your guide to getting started in Second Life. Check the bottom of the card for links to more help.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The first things you should learn ==&lt;br /&gt;
&lt;br /&gt;
There is a lot to learn about Second Life, but here is the minimum you need to get started.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Movement --&#039;&#039;&#039;&lt;br /&gt;
Movement includes walking, running, and flying.  To walk forward, backwards and turn left and right you can use the arrow keys.  You can also do the same with the letters WASD on your keyboard. Pressing CTRL + R will toggle if you are running or not.  Hold shift to strafe sideways.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Flying --&#039;&#039;&#039;&lt;br /&gt;
To fly, you can hit the blue fly button at the bottom of your screen, or hit F, or press and hold the Page Up key. Once airborne,  you can use either Page Up and Page Down to rise and fall, or E and C on your keyboard. Tapping those will make you jump.  Hit the Home key or F again or &amp;quot;stop flying&amp;quot; to do just that.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Focus --&#039;&#039;&#039; &lt;br /&gt;
If you notice that some keys work differently when you are chatting, it&#039;s due to focus.  Where you last click can change the WASD keys to only let you type.  To restore focus to movement, hit ESC up to 3 times or click once on the ground in front of you.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Camera Control --&#039;&#039;&#039;&lt;br /&gt;
Click and drag on your back to take a look around.  ALT+click and drag on an object to zoom in and out and pan around it.  CTRL+ALT+click and drag to &amp;quot;orbit&amp;quot;.  CTRL+ALT+SHIFT+click and drag to pan left right up and down.  Hitting the esc key twice will reset your view.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Mouse Look --&#039;&#039;&#039;&lt;br /&gt;
Mouse look will have you see from your avatar&#039;s point of view and change your controls a little.  You will now strafe left and right and steer with the mouse. Hit M to enter mouse look and esc to get out of it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Communication --&#039;&#039;&#039;&lt;br /&gt;
Make sure you know how to Instant Message people you can see, and people  you can&#039;t see via your Search and Friends buttons.  Also make sure you get an idea of how far you can be &amp;quot;heard&amp;quot; when you chat or shout.  As you join groups, you will see that you can start chats with entire groups.  Gestures in your inventory are another way to communicate or add to what you say.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Interaction --&#039;&#039;&#039;&lt;br /&gt;
Interacting with objects is a big part of Second Life.  Have you tried sitting on poseballs?  Playing a game?  Buying and object? Make sure you know about the pie menu as well as when to right click or left click. If you have one mouse button, use CMD + click for right click.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- New Interactions --&#039;&#039;&#039;&lt;br /&gt;
While most actions still are accessable via right click.  Many can now happen with a left click.  For example, if you see a chair icon when you hover over an object, touching (left-clicking) it will automatically seat you.  Similar icons exist for buying, paying money to, and opening objects.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Objects and Inventory --&#039;&#039;&#039;&lt;br /&gt;
While not everyone builds in Second Life, it&#039;s a good idea to learn the basics of moving things in edit, attaching and detaching objects from your avatar, how to find things in your inventory, and how to &amp;quot;unpack&amp;quot; a box you may receive.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;-- Respect --&#039;&#039;&lt;br /&gt;
There is no set of rules to define respect, except to treat others as you would like to be treated. The ability to do something does not imply permission.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CONCEPTS OF THE MAIN LAND ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;-- Map and Teleporting --&#039;&#039;&lt;br /&gt;
The map lets you see nearly the whole world at once if you zoom out.  Each tiny square represents an area as big as help island.  Each one is a &amp;quot;simulator&amp;quot; (sim).  Second Life is at about 1600 sims as of January 2006.  Some are connected so that you can walk and fly between them.  Others are individual islands that can be reached only via teleport.  Walking or even flying everywhere would take hours.&lt;br /&gt;
&lt;br /&gt;
Double click on an area to be transported there,  you will either arrive there directly, or as close as possible and be given a red beacon to follow.  When you want to bring someone to a location, you can offer them a teleport via their profile.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Landmarks --&#039;&#039;&#039;&lt;br /&gt;
Landmarks are the Second Life equivalent of a bookmark.  They save a place that you or someone else has been.  You can find them in your inventory.  Double click them and you will get a teleport option as a pop up.  Create your own by pulling down the WORLD menu and choosing &amp;quot;Create Landmark Here&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Search --&#039;&#039;&#039;&lt;br /&gt;
Find will let you look up events, people, products, and also let you teleport to the various areas you find.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Friends --&#039;&#039;&#039;&lt;br /&gt;
As you explore you may make many friends.  When you offer friendship  it is reciprocal and gives the ability to see each other on the map. You can also offer a calling card instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;--  Damage Enabled Areas --&#039;&#039;&#039;&lt;br /&gt;
In certain areas you will see a heart and &amp;quot;100%&amp;quot; at the top of your screen.  This means you can take damage. If your health reaches zero you get sent back to where you have set as your &amp;quot;home&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== WHERE TO GET MORE HELP ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s best to get help where it&#039;s already offered.   Not everyone you meet in Second Life is experienced and knowledgeable in every area. Some people specialize. Others may be brand new, like yourself. If you missed Help Island or left too soon, a public version of Help Island exists.  Pressing on the links below should give you a landmark into your inventory.  Also listed are some other locations where people are happy to help you out.&lt;br /&gt;
&lt;br /&gt;
 : Island with tutorials &lt;br /&gt;
 : Classrooms and lots of help to be found&lt;br /&gt;
&lt;br /&gt;
If you have an immediate issue, pull dodwn the &amp;quot;Help&amp;quot; menu at the top of your screen and choose &amp;quot;Help Request&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life/es&amp;diff=9618</id>
		<title>Getting started in Second Life/es</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life/es&amp;diff=9618"/>
		<updated>2007-02-11T11:10:09Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is a translation of (link goes here), please do not edit while translation is being finalized.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ayuda básica para la Segunda Vida. ==&lt;br /&gt;
&lt;br /&gt;
¿Perdido? ¿Confuso? ¡Las dos cosas?! Esta tarjeta será su guía para usar Segunda Vida. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Las primeras cosas que usted debe aprender ==&lt;br /&gt;
&lt;br /&gt;
Hay mucho que aprender sobre la Segunda Vida, pero aquí les presento el mínimo que usted necesita saber.&lt;br /&gt;
&lt;br /&gt;
-- Movimiento --&lt;br /&gt;
El movimiento incluye caminar, correr, y volar. Para caminar adelante, al revés y manejar a la izquierda y a la derecha usted puede utilizar las llaves de flecha. También puedes usar las letras WASD en su teclado. Presionando CTRL + R cambiara si estas corriendo o caminando. Oprima la  tecla de mayúsculas (SHIFT) mientras que caminas a la izquierda y a la derecha para no cambiar de vista (strafe).&lt;br /&gt;
&lt;br /&gt;
-- Volar --&lt;br /&gt;
Para volar, usted puede hacer clic en el botón azul que dice &amp;quot;fly&amp;quot; en el fondo de su pantalla, o oprima F, o presiona y sostén la tecla &amp;quot;page up&amp;quot;. Una vez que comienzas volar, usted pueda utilizar &amp;quot;page up&amp;quot; o &amp;quot;page down&amp;quot; para levantarse y para descender. &amp;quot;E&amp;quot; y &amp;quot;C&amp;quot; en su teclado hace lo mismo. Tocando &amp;quot;page up&amp;quot; y &amp;quot;page down&amp;quot; una ves rapido te hace brincar o agacharte. Tocando la tecla HOME o F otra vez te hace caer.  También el botón &amp;quot;stop flying&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-- Foco -- &lt;br /&gt;
Si usted nota que algunas llaves trabajan diferentemente cuando usted está charlando, es debido al foco. Donde usted toca su ratón puede cambiar los teclados de WASD para ser solamente para mecanografiar. Para restaurar el foco al movimiento, oprime el teclado &amp;quot;esc&amp;quot;  3 veces o haga clic una vez en la tierra delante de usted.&lt;br /&gt;
&lt;br /&gt;
-- Control de la vista -- &lt;br /&gt;
Si haces clic en su espalda y lo mantienes, puedes tomar una mirada alrededor. Si oprimes ALT mientras que haces clic en objeto, moviendo el raton para ariba y abajor te cambia la vista mas serca or mas lejos del objeto. Con CTRL + ALT y clic mueves su vista en un &amp;quot;órbita&amp;quot;. CTRL+ALT+SHIFT+clic para mover la vista para arriba, abajor, y a los dos lados (truck). Pprime el teclado &amp;quot;esc&amp;quot; para reajustará su vista normal.&lt;br /&gt;
&lt;br /&gt;
-- Mirada del ratón (Mouse Look)-- &lt;br /&gt;
La mirada del ratón hará que usted vea desde el punto de vista de su avatar y cambiara sus controles un poco. Usted ahora cambiaras su vista a la con el ratón y manejaras adelande, atras y par los dos lados con sus flechas (o WASD). Oprime M para incorporar mirada del ratón (mouse look) y oprime el teclado &amp;quot;esc&amp;quot; para salir de ella.&lt;br /&gt;
&lt;br /&gt;
-- Comunicación -- &lt;br /&gt;
Debe Uster saber como comunicarse con gente que estan serca y lejos con botones de la búsqueda, charlar, y de los amigos (Chat, Search and Friends). Cuando uno usa Charlar te pueden escuchar todos dentro de un sierto distancia. Tambien existen grupos con quein puedes mandar mesajes. Los gestos en su inventario son otra manera de comunicarse.&lt;br /&gt;
&lt;br /&gt;
-- interacción --&lt;br /&gt;
el obrar recíprocamente con los objetos es una parte grande de Segunda Vida. ¿Usted ha intentado sentarse en poseballs? ¿Jugar un juego? ¿Compra y objeto? Se cerciora de usted saber sobre el menú de la empanada así como cuándo enderezar tecleo o tecleo izquierdo. Si usted tiene un botón de ratón, utilice CMD + tecleo para el tecleo derecho.&lt;br /&gt;
 -- nuevas interacciones -- mientras que la mayoría de las acciones siguen siendo accesibles vía tecleo derecho. Muchos pueden ahora suceder con un tecleo izquierdo. Por ejemplo, si usted ve un icono de la silla cuando usted asoma sobre un objeto, el tacto (el izquierdo-chascar) de él le asentará automáticamente. Los iconos similares existen para comprar, pagar el dinero a, y abrir objetos.&lt;br /&gt;
-- objetos e inventario -- mientras que no cada una las estructuras en la Segunda Vida, él es una buena idea de aprender que los fundamentos de cosas móviles adentro corrigen, uniendo y separar objetos de su avatar, cómo encontrar cosas en su inventario, y cómo &amp;quot;desempaqueta&amp;quot; una caja que usted puede recibir. &lt;br /&gt;
-- respecto -- no hay sistema de reglas para definir respecto, a menos que para tratar otros pues usted quisiera ser tratado. La capacidad de hacer algo no implica el permiso.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CONCEPTOS DEL DE LA TIERRA ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
PRINCIPAL DE LA TIERRA -- mapa y el teleporting -- el mapa le deja ver casi el mundo entero inmediatamente si usted enfoca hacia fuera. Cada cuadrado minúsculo representa un área tan grande como la isla de la ayuda. Cada es un &amp;quot;simulador&amp;quot; (sim). La Segunda Vida está en los sims cerca de 1600 en fecha enero de 2006. Algunos están conectados de modo que usted pueda caminar y volar entre ellos. Otras son las islas individuales vía las cuales puede ser alcanzado solamente teleport. El caminar o aún el volar por todas partes tomaría horas.&lt;br /&gt;
&lt;br /&gt;
-- búsqueda -- el hallazgo le dejará mirar para arriba los acontecimientos, gente, productos, y también le dejó teleport a las varias áreas que usted encuentra. -- amigos -- como usted le explora puede hacer a muchos amigos. Cuando usted ofrece amistad que es recíproco y da la capacidad de verse en el mapa. Usted puede también ofrecer una tarjeta para el teléfono en lugar de otro.&lt;br /&gt;
&lt;br /&gt;
-- áreas permitidas daños -- en ciertas áreas usted verá un corazón y un &amp;quot;100%&amp;quot; en la tapa de su pantalla. Esto significa que usted puede tomar daño. Si su salud alcanza cero usted consigue enviado de nuevo a donde usted ha fijado como su &amp;quot;hogar&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life&amp;diff=9617</id>
		<title>Getting started in Second Life</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life&amp;diff=9617"/>
		<updated>2007-02-11T11:04:18Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: formating&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is an experiment of the multi-language set up&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Quick Tips for Second Life ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lost? Confused? Both?!  This card will be your guide to getting started in Second Life. Check the bottom of the card for links to more help.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The first things you should learn ==&lt;br /&gt;
&lt;br /&gt;
There is a lot to learn about Second Life, but here is the minimum you need to get started.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Movement --&#039;&#039;&#039;&lt;br /&gt;
Movement includes walking, running, and flying.  To walk forward, backwards and turn left and right you can use the arrow keys.  You can also do the same with the letters WASD on your keyboard. Pressing CTRL + R will toggle if you are running or not.  Hold shift to strafe sideways.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Flying --&#039;&#039;&#039;&lt;br /&gt;
To fly, you can hit the blue fly button at the bottom of your screen, or hit F, or press and hold the Page Up key. Once airborne,  you can use either Page Up and Page Down to rise and fall, or E and C on your keyboard. Tapping those will make you jump.  Hit the Home key or F again or &amp;quot;stop flying&amp;quot; to do just that.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Focus --&#039;&#039;&#039; &lt;br /&gt;
If you notice that some keys work differently when you are chatting, it&#039;s due to focus.  Where you last click can change the WASD keys to only let you type.  To restore focus to movement, hit ESC up to 3 times or click once on the ground in front of you.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Camera Control --&#039;&#039;&#039;&lt;br /&gt;
Click and drag on your back to take a look around.  ALT+click and drag on an object to zoom in and out and pan around it.  CTRL+ALT+click and drag to &amp;quot;orbit&amp;quot;.  CTRL+ALT+SHIFT+click and drag to pan left right up and down.  Hitting the esc key twice will reset your view.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Mouse Look --&#039;&#039;&#039;&lt;br /&gt;
Mouse look will have you see from your avatar&#039;s point of view and change your controls a little.  You will now strafe left and right and steer with the mouse. Hit M to enter mouse look and esc to get out of it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Communication --&#039;&#039;&#039;&lt;br /&gt;
Make sure you know how to Instant Message people you can see, and people  you can&#039;t see via your Search and Friends buttons.  Also make sure you get an idea of how far you can be &amp;quot;heard&amp;quot; when you chat or shout.  As you join groups, you will see that you can start chats with entire groups.  Gestures in your inventory are another way to communicate or add to what you say.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Interaction --&#039;&#039;&#039;&lt;br /&gt;
Interacting with objects is a big part of Second Life.  Have you tried sitting on poseballs?  Playing a game?  Buying and object? Make sure you know about the pie menu as well as when to right click or left click. If you have one mouse button, use CMD + click for right click.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- New Interactions --&#039;&#039;&#039;&lt;br /&gt;
While most actions still are accessable via right click.  Many can now happen with a left click.  For example, if you see a chair icon when you hover over an object, touching (left-clicking) it will automatically seat you.  Similar icons exist for buying, paying money to, and opening objects.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Objects and Inventory --&#039;&#039;&#039;&lt;br /&gt;
While not everyone builds in Second Life, it&#039;s a good idea to learn the basics of moving things in edit, attaching and detaching objects from your avatar, how to find things in your inventory, and how to &amp;quot;unpack&amp;quot; a box you may receive.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;-- Respect --&#039;&#039;&lt;br /&gt;
There is no set of rules to define respect, except to treat others as you would like to be treated. The ability to do something does not imply permission.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CONCEPTS OF THE MAIN LAND ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;-- Map and Teleporting --&#039;&#039;&lt;br /&gt;
The map lets you see nearly the whole world at once if you zoom out.  Each tiny square represents an area as big as help island.  Each one is a &amp;quot;simulator&amp;quot; (sim).  Second Life is at about 1600 sims as of January 2006.  Some are connected so that you can walk and fly between them.  Others are individual islands that can be reached only via teleport.  Walking or even flying everywhere would take hours.&lt;br /&gt;
&lt;br /&gt;
Double click on an area to be transported there,  you will either arrive there directly, or as close as possible and be given a red beacon to follow.  When you want to bring someone to a location, you can offer them a teleport via their profile.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Landmarks --&#039;&#039;&#039;&lt;br /&gt;
Landmarks are the Second Life equivalent of a bookmark.  They save a place that you or someone else has been.  You can find them in your inventory.  Double click them and you will get a teleport option as a pop up.  Create your own by pulling down the WORLD menu and choosing &amp;quot;Create Landmark Here&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Search --&#039;&#039;&#039;&lt;br /&gt;
Find will let you look up events, people, products, and also let you teleport to the various areas you find.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;-- Friends --&#039;&#039;&#039;&lt;br /&gt;
As you explore you may make many friends.  When you offer friendship  it is reciprocal and gives the ability to see each other on the map. You can also offer a calling card instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;--  Damage Enabled Areas --&#039;&#039;&#039;&lt;br /&gt;
In certain areas you will see a heart and &amp;quot;100%&amp;quot; at the top of your screen.  This means you can take damage. If your health reaches zero you get sent back to where you have set as your &amp;quot;home&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== WHERE TO GET MORE HELP ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s best to get help where it&#039;s already offered.   Not everyone you meet in Second Life is experienced and knowledgeable in every area. Some people specialize. Others may be brand new, like yourself. If you missed Help Island or left too soon, a public version of Help Island exists.  Pressing on the links below should give you a landmark into your inventory.  Also listed are some other locations where people are happy to help you out.&lt;br /&gt;
&lt;br /&gt;
 : Island with tutorials &lt;br /&gt;
 : Classrooms and lots of help to be found&lt;br /&gt;
&lt;br /&gt;
If you have an immediate issue, pull dodwn the &amp;quot;Help&amp;quot; menu at the top of your screen and choose &amp;quot;Help Request&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life&amp;diff=9616</id>
		<title>Getting started in Second Life</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_in_Second_Life&amp;diff=9616"/>
		<updated>2007-02-11T10:57:26Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is an experiment of the multi-language set up&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Quick Tips for Second Life&lt;br /&gt;
======================&lt;br /&gt;
Lost? Confused? Both?!  This card will be your guide to getting started in Second Life. Check the bottom of the card for links to more help.  &lt;br /&gt;
&lt;br /&gt;
The first things you should learn&lt;br /&gt;
======================&lt;br /&gt;
There is a lot to learn about Second Life, but here is the minimum you need to get started.&lt;br /&gt;
&lt;br /&gt;
-- Movement --&lt;br /&gt;
Movement includes walking, running, and flying.  To walk forward, backwards and turn left and right you can use the arrow keys.  You can also do the same with the letters WASD on your keyboard. Pressing CTRL + R will toggle if you are running or not.  Hold shift to strafe sideways.&lt;br /&gt;
&lt;br /&gt;
-- Flying --&lt;br /&gt;
To fly, you can hit the blue fly button at the bottom of your screen, or hit F, or press and hold the Page Up key. Once airborne,  you can use either Page Up and Page Down to rise and fall, or E and C on your keyboard. Tapping those will make you jump.  Hit the Home key or F again or &amp;quot;stop flying&amp;quot; to do just that.&lt;br /&gt;
&lt;br /&gt;
-- Focus -- &lt;br /&gt;
If you notice that some keys work differently when you are chatting, it&#039;s due to focus.  Where you last click can change the WASD keys to only let you type.  To restore focus to movement, hit ESC up to 3 times or click once on the ground in front of you.&lt;br /&gt;
&lt;br /&gt;
-- Camera Control --&lt;br /&gt;
Click and drag on your back to take a look around.  ALT+click and drag on an object to zoom in and out and pan around it.  CTRL+ALT+click and drag to &amp;quot;orbit&amp;quot;.  CTRL+ALT+SHIFT+click and drag to pan left right up and down.  Hitting the esc key twice will reset your view.&lt;br /&gt;
&lt;br /&gt;
-- Mouse Look --&lt;br /&gt;
Mouse look will have you see from your avatar&#039;s point of view and change your controls a little.  You will now strafe left and right and steer with the mouse. Hit M to enter mouse look and esc to get out of it.&lt;br /&gt;
&lt;br /&gt;
-- Communication --&lt;br /&gt;
Make sure you know how to Instant Message people you can see, and people  you can&#039;t see via your Search and Friends buttons.  Also make sure you get an idea of how far you can be &amp;quot;heard&amp;quot; when you chat or shout.  As you join groups, you will see that you can start chats with entire groups.  Gestures in your inventory are another way to communicate or add to what you say.&lt;br /&gt;
&lt;br /&gt;
-- Interaction --&lt;br /&gt;
Interacting with objects is a big part of Second Life.  Have you tried sitting on poseballs?  Playing a game?  Buying and object? Make sure you know about the pie menu as well as when to right click or left click. If you have one mouse button, use CMD + click for right click.&lt;br /&gt;
&lt;br /&gt;
-- New Interactions --&lt;br /&gt;
While most actions still are accessable via right click.  Many can now happen with a left click.  For example, if you see a chair icon when you hover over an object, touching (left-clicking) it will automatically seat you.  Similar icons exist for buying, paying money to, and opening objects.&lt;br /&gt;
&lt;br /&gt;
-- Objects and Inventory --&lt;br /&gt;
While not everyone builds in Second Life, it&#039;s a good idea to learn the basics of moving things in edit, attaching and detaching objects from your avatar, how to find things in your inventory, and how to &amp;quot;unpack&amp;quot; a box you may receive.&lt;br /&gt;
&lt;br /&gt;
-- Respect --&lt;br /&gt;
There is no set of rules to define respect, except to treat others as you would like to be treated. The ability to do something does not imply permission.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CONCEPTS OF THE MAIN LAND&lt;br /&gt;
==================&lt;br /&gt;
&lt;br /&gt;
-- Map and Teleporting --&lt;br /&gt;
The map lets you see nearly the whole world at once if you zoom out.  Each tiny square represents an area as big as help island.  Each one is a &amp;quot;simulator&amp;quot; (sim).  Second Life is at about 1600 sims as of January 2006.  Some are connected so that you can walk and fly between them.  Others are individual islands that can be reached only via teleport.  Walking or even flying everywhere would take hours.&lt;br /&gt;
&lt;br /&gt;
Double click on an area to be transported there,  you will either arrive there directly, or as close as possible and be given a red beacon to follow.  When you want to bring someone to a location, you can offer them a teleport via their profile.&lt;br /&gt;
&lt;br /&gt;
-- Landmarks --&lt;br /&gt;
Landmarks are the Second Life equivalent of a bookmark.  They save a place that you or someone else has been.  You can find them in your inventory.  Double click them and you will get a teleport option as a pop up.  Create your own by pulling down the WORLD menu and choosing &amp;quot;Create Landmark Here&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-- Search --&lt;br /&gt;
Find will let you look up events, people, products, and also let you teleport to the various areas you find.&lt;br /&gt;
&lt;br /&gt;
-- Friends --&lt;br /&gt;
As you explore you may make many friends.  When you offer friendship  it is reciprocal and gives the ability to see each other on the map. You can also offer a calling card instead.&lt;br /&gt;
&lt;br /&gt;
--  Damage Enabled Areas --&lt;br /&gt;
In certain areas you will see a heart and &amp;quot;100%&amp;quot; at the top of your screen.  This means you can take damage. If your health reaches zero you get sent back to where you have set as your &amp;quot;home&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
WHERE TO GET MORE HELP&lt;br /&gt;
======================&lt;br /&gt;
It&#039;s best to get help where it&#039;s already offered.   Not everyone you meet in Second Life is experienced and knowledgeable in every area. Some people specialize. Others may be brand new, like yourself. If you missed Help Island or left too soon, a public version of Help Island exists.  Pressing on the links below should give you a landmark into your inventory.  Also listed are some other locations where people are happy to help you out.&lt;br /&gt;
&lt;br /&gt;
 : Island with tutorials &lt;br /&gt;
 : Classrooms and lots of help to be found&lt;br /&gt;
&lt;br /&gt;
If you have an immediate issue, pull dodwn the &amp;quot;Help&amp;quot; menu at the top of your screen and choose &amp;quot;Help Request&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Portal&amp;diff=9536</id>
		<title>Talk:LSL Portal</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LSL_Portal&amp;diff=9536"/>
		<updated>2007-02-11T02:17:08Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Syntax Highlighting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
= Please do not copy content from LSLwiki =&lt;br /&gt;
&lt;br /&gt;
From [http://forums.secondlife.com/showpost.php?p=1392697&amp;amp;postcount=44 Rob Linden&#039;s post to the forum]:&lt;br /&gt;
:Hi folks, sorry for dropping into this conversation late. I haven&#039;t read through everything here, but I&#039;d like to present an alternative.&lt;br /&gt;
&lt;br /&gt;
:There have been several requests that Linden Lab take on the hosting of the LSL wiki. There are several problems with us doing this work. The primary problem is the question of ownership of the material. Since, to the best of our knowledge, there was never an explicit, consistent notice of ownership of this material throughout its creation, nor a clear assignment/license associated with contributing more material, it would seem the only safe way to license this content would be to contact every single contributor throughout the life of the wiki and get an explicit license or copyright assignment from them. Note that I said &amp;quot;safe&amp;quot;, not &amp;quot;practical&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:We&#039;re not in a position to go down that road. However, we do have wiki.secondlife.com, which has had, since day one, a very clear notice about the license under which contributions are made and distributed. We would be very happy to see the community collaborate on newly created content on wiki.secondlife.com. As long as you author the content (not cut and paste from sources you are not the sole author of), we welcome your contribution. -- [[User:Rob Linden|Rob Linden]] 14:30, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
OK, so let&#039;s talk about formatting rules for entries.&lt;br /&gt;
&lt;br /&gt;
(Moved to [[LSL Portal Guidelines]], so that this talk doesn&#039;t get too cluttered.) -- [[User:Talarus Luan|Talarus Luan]] 16:32, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
[[User:Talarus Luan|Talarus Luan]] 14:28, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Other Discussion=&lt;br /&gt;
&lt;br /&gt;
Should we make this the front page to the LSL reference, or put that one more level down?  I kinda lean toward the former.  [[User:Gigs Taggart|Gigs Taggart]] 14:09, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Yeah i think so... (Unsigned by Dimentox Travanti}&lt;br /&gt;
:Remember to sign your post with four tildes. [[User:Gigs Taggart|Gigs Taggart]] 14:26, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used a modified version of the [http://meta.wikimedia.org/wiki/User:Ajqnic:GeSHiHighlight GeSHiHighlight] plugin for MediaWiki.  With an LSL syntax file.  The license for the plugin and for [http://qbnz.com/highlighter/ GeSHi] is GPL, it also requires another plugin [http://meta.wikimedia.org/wiki/User:Ajqnic:purgePage purgePage].&lt;br /&gt;
--[[User:Thraxis Epsilon|Thraxis Epsilon]] 15:00, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Regarding copying content from the existing Wiki ==&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t clear from Rob&#039;s post, but it should be made clear: we CAN copy our OWN content from the existing wiki. IE, I plan to copy/paste my XML-RPC notes from the existing one. Does that present an issue? If so, why?&lt;br /&gt;
[[User:Talarus Luan|Talarus Luan]] 16:03, 24 January 2007 (PST)&lt;br /&gt;
:If you are the sole author, it wouldn&#039;t.  Just be careful and check the page history.   [[User:Gigs Taggart|Gigs Taggart]] 16:10, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Syntax Highlighting ==&lt;br /&gt;
&lt;br /&gt;
Updated info on the syntax highlighting is available here [[http://rpgstats.com/wiki/index.php?title=GeSHiHiLight.php GeSHiHiLight]]&lt;br /&gt;
--[[User:Thraxis Epsilon|Thraxis Epsilon]] 16:10, 24 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
:Lets hope they include it soon ^^ [[User:Strife Onizuka|Strife Onizuka]] 21:21, 24 January 2007 (PST)&lt;br /&gt;
:Is there anyone we can ask? [[User:Dimentox Travanti|Dimentox Travanti]] 10:50, 25 January 2007 (PST)&lt;br /&gt;
:any news or update on this? [[User:Blueman Steele|Blueman Steele]] 6:12, 10 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Let&#039;s refer to this simply as the &amp;quot;LSL portal&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Since there&#039;s already something out there called the &amp;quot;LSLwiki&amp;quot;, let&#039;s refer to this as the LSL Portal to distinguish it.  If there&#039;s no objection, I&#039;ll move the pages with &amp;quot;LSL Wiki&amp;quot; in the title to some other appropriate name -- [[User:Rob Linden|Rob Linden]] 17:09, 24 January 2007 (PST)&lt;br /&gt;
:No objections here. :) I just updated [[LSL Wiki To-do]] with some assignment tables. I went ahead and moved it to [[LSL Portal To-do]] [[User:Talarus Luan|Talarus Luan]] 18:12, 24 January 2007 (PST)&lt;br /&gt;
:: Simple, consistent messaging: I&#039;ve gotten into the habit of using &amp;quot;LSL Portal&amp;quot; regularly myself.&lt;br /&gt;
:: --[[User:Torley Linden|Torley Linden]] 10:40, 31 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== A way back... ==&lt;br /&gt;
&lt;br /&gt;
Every page should have a header that goes back to the portal index not the wiki index.&lt;br /&gt;
if we could even geta link in the left hand would be great.&lt;br /&gt;
&lt;br /&gt;
[[User:Dimentox Travanti|Dimentox Travanti]] 10:47, 25 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Transitions ==&lt;br /&gt;
Encouraging to see this happening — and to see [http://www.lslwiki.org/ a second mirror] for the [http://www.lslwiki.com LSL wiki] too; hopefully I haven&#039;t come too late, because these developments look like they&#039;ve transpired over the last few days.&lt;br /&gt;
&lt;br /&gt;
Just wanted to let you know I&#039;ve added a link to our LSL Portal from our blog&#039;s Notices; it&#039;ll be up for some time. I&#039;m also going to add a simple article to the [http://secondlife.com/knowledgebase/ Knowledge Base] directing to this LSL Portal, since it&#039;s important to get more contributors aware, interested, and involved.&lt;br /&gt;
&lt;br /&gt;
I&#039;d like to personally be more active in this wiki... great things are afoot. I&#039;ve been spread across too many [http://secondlife.com/knowledgebase/article.php?id=357 communication channels] lately, so I&#039;ve been rotating between focuses (foci?); hopefully next week I&#039;ll have more hands-on energy here.&lt;br /&gt;
&lt;br /&gt;
Thanx to each and all of you building up this resource so far!&lt;br /&gt;
&lt;br /&gt;
--[[User:Torley Linden|Torley Linden]] 10:21, 26 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== LSL Header/Footer ==&lt;br /&gt;
Below is the header/footer template: &amp;lt;nowiki&amp;gt;{{LSL Header}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
{{LSL Header}}&lt;br /&gt;
Also, since &amp;lt;nowiki&amp;gt;&amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt;&amp;lt;/nowiki&amp;gt; tags don&#039;t seem to work yet, I used &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;... hope that&#039;s alright, I know nothing about wikis except what I&#039;ve taught myself tonight. --[[User:DoteDote Edison|DoteDote Edison]] 20:45, 27 January 2007 (EST)&lt;br /&gt;
:Actually, go ahead and use the &amp;lt;nowiki&amp;gt;&amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt;&amp;lt;/nowiki&amp;gt; tags. Even though it may look like crap right this minute, as soon as the module is installed, it will instantly be perfect. :) [[User:Talarus Luan|Talarus Luan]] 14:59, 29 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== LSL wiki-namespace ==&lt;br /&gt;
&lt;br /&gt;
All the LSL pages are prefixed with &amp;quot;LSL &amp;quot;, like &amp;quot;LSL Portal&amp;quot;, &amp;quot;LSL LLRand&amp;quot;, etc.  It would seem more justly to use the wiki-namespace &amp;quot;LSL:&amp;quot;.  Change the names from &amp;quot;LSL LLRand&amp;quot; to &amp;quot;LSL:LLRand&amp;quot;.  My 2 lindens. [[User:Dzonatas Sol|Dzonatas Sol]] 00:28, 2 February 2007 (PST) &lt;br /&gt;
:Just thought about this little more. We could use subpages instead of namespaces, then the talk pages will fully work.  &amp;quot;LSL/LLRand&amp;quot; for example [[User:Dzonatas Sol|Dzonatas Sol]] 00:41, 2 February 2007 (PST)&lt;br /&gt;
::I&#039;m not going to make a big fuss about it, but I&#039;d prefer if, per the [[Editing Guidelines]], that the page just be called &amp;quot;LLRand&amp;quot;. -- [[User:Rob Linden|Rob Linden]] 01:06, 2 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== LSL conformance test ==&lt;br /&gt;
&lt;br /&gt;
Hi folks, we&#039;re planning to consolidate a lot of our scattered LSL conformance tests on this wiki.  I created two rather crude templates: [[Template:LSL conformance test]] and [[Template:LSL conformance script]], which were created for adding our conformance suite.  See [[LSL llGetUnixTime test]] for an example.  I&#039;d like to get a sense from people if this is a sensible way to do this.  The idea is to get these templates stabilized, and that will provide us a mechanism for those of us at LL to consolidate our tests.  Of course, if the community wants to chip in, that&#039;s great too...having items in our standard LSL conformance suite makes it less likely that we&#039;ll break an LSL feature that&#039;s important to you. -- [[User:Rob Linden|Rob Linden]] 22:53, 7 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== LSL Categories List ==&lt;br /&gt;
What about a vertical list of categories down the right side of the LSL Portal front page?  The right-side list on the original wiki was my primary source of navigation, but maybe I&#039;m odd.  I could add it myself, but I&#039;m not sure how to make it automatically update the list as new categories are added. --[[User:DoteDote Edison|DoteDote Edison]] 20:20, 9 February 2007 (EST)&lt;br /&gt;
:Oops... right after I posted this, I noticed that it&#039;s item #4 on the &amp;quot;To-Do&amp;quot; list.  I went ahead and modified the front page to add a cetagories list.  If you don&#039;t like it, feel free to revert.  --[[User:DoteDote Edison|DoteDote Edison]] 20:55, 9 February 2007 (EST)&lt;br /&gt;
:The names all start with &amp;quot;LSL&amp;quot; and the names are not optimal for listing... The names could be changed though. I&#039;ll dig though the MediaWiki commands later and see if I can find any that would work well in this case. I don&#039;t have high hopes in this case. [[User:Strife Onizuka|Strife Onizuka]] 18:59, 9 February 2007 (PST)&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=9417</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=9417"/>
		<updated>2007-02-10T17:25:27Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* What is LSL? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHO THIS TUTORIAL IS FOR:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life. LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own. You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. Scripts in Second Life are a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL unique is its heavy emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life objects have &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;.  Events are not user defined in Second Life but rather predefined. They are either caused by objects and avatars interacting in the world, or they are created in a script. Events trigger event handlers (sometimes just called &amp;quot;events&amp;quot; as well). One called Touch_start(), will trigger the code in it when the object running the script is touched. So the minimum LSL program must have one state with one event in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
           llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
(note: all scripts will be placed in LSL tags when it goes active)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &amp;quot;create&amp;quot;. (for one button macs use command+click)&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &amp;quot;wand&amp;quot; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &amp;quot;edit&amp;quot; mode and an edit window will pop up.&lt;br /&gt;
(Note: to place a script in an existing object, right click it and hit edit to open the edit window.)&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &amp;quot;more&amp;gt;&amp;gt;&amp;gt;&amp;quot; click it to reveal five tabs marked general, object, features, content, and texture. Click &amp;quot;content&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &amp;quot;new script&amp;quot; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &amp;quot;save&amp;quot; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot;&lt;br /&gt;
(make sure the &amp;quot;edit&amp;quot; building window is closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and reseting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car.... while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 // contents of state go here&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state playing&lt;br /&gt;
 {&lt;br /&gt;
 // this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;state_entry&amp;quot; which is triggered by the state being entered, and &amp;quot;touch_start&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 // Code start&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      // this is an event&lt;br /&gt;
      {&lt;br /&gt;
      // this is the content of the event&lt;br /&gt;
      }&lt;br /&gt;
      // end of event&lt;br /&gt;
 }&lt;br /&gt;
 // end of state&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lower case L&#039;s. We&#039;ve seen llSay() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. Copy and paste this to a new script to see it color coded.&lt;br /&gt;
&lt;br /&gt;
 // All Scripts need a Default State&lt;br /&gt;
 default&lt;br /&gt;
 // this open curly bracket denotes the start of the state&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // an event&lt;br /&gt;
      // another curly bracket starts the  body of the event&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&lt;br /&gt;
      }&lt;br /&gt;
      // closed curly bracked closes the state_entry event&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
      }&lt;br /&gt;
      // end of touch start&lt;br /&gt;
 }&lt;br /&gt;
 // Code end&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;state_entry&amp;quot; event which in turn runs the function llSay() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;touch_start&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Lets look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
 default //default state is mandatory&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // runs each time the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
      llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
      // note the semicolons at the end of each instruction.&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
      {&lt;br /&gt;
      state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
 } // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
 state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // this is run as soon as the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
      llSetColor(&amp;lt;0,0,0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      state default;&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;default&amp;quot; all new states begin with the word &amp;quot;state&amp;quot;. Also, while the object has a texture, the color will effect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;state_entry&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
 [[LSL_llSay|llSay]](0, &amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
 llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES);&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1&#039;s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;touch_start&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
 state off;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
llWhisper( ) is just like llSay( ) but only broadcasts at half the distance. You still must state what channel. So....&lt;br /&gt;
&lt;br /&gt;
 llWhisper(0,&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using llShout( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
llOwnerSay( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
 llOwnerSay(&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via llSetText( ) like this.&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1,1,1&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1,1,1&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0,0,0&amp;gt; means &amp;quot;black&amp;quot;. Replace the llSay(0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0,0,0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=9415</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=9415"/>
		<updated>2007-02-10T17:20:46Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Getting started in LSL scripting in Second Life */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHO THIS TUTORIAL IS FOR:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life. LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own. You will need to be familiar with the basic principles of Second Life and have general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. Scripts in Second Life are a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL unique is its heavy emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life objects have &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;. Events are not user defined in Second Life but rather predefined in LSL. One called Touch_start(), will trigger the code in it when the object running the script is touched. So the minimum LSL program must have one state with one event in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
           llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
(note: all scripts will be placed in LSL tags when it goes active)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &amp;quot;create&amp;quot;. (for one button macs use command+click)&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &amp;quot;wand&amp;quot; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &amp;quot;edit&amp;quot; mode and an edit window will pop up.&lt;br /&gt;
(Note: to place a script in an existing object, right click it and hit edit to open the edit window.)&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &amp;quot;more&amp;gt;&amp;gt;&amp;gt;&amp;quot; click it to reveal five tabs marked general, object, features, content, and texture. Click &amp;quot;content&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &amp;quot;new script&amp;quot; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &amp;quot;save&amp;quot; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot;&lt;br /&gt;
(make sure the &amp;quot;edit&amp;quot; building window is closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and reseting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car.... while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 // contents of state go here&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state playing&lt;br /&gt;
 {&lt;br /&gt;
 // this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;state_entry&amp;quot; which is triggered by the state being entered, and &amp;quot;touch_start&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 // Code start&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      // this is an event&lt;br /&gt;
      {&lt;br /&gt;
      // this is the content of the event&lt;br /&gt;
      }&lt;br /&gt;
      // end of event&lt;br /&gt;
 }&lt;br /&gt;
 // end of state&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lower case L&#039;s. We&#039;ve seen llSay() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. Copy and paste this to a new script to see it color coded.&lt;br /&gt;
&lt;br /&gt;
 // All Scripts need a Default State&lt;br /&gt;
 default&lt;br /&gt;
 // this open curly bracket denotes the start of the state&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // an event&lt;br /&gt;
      // another curly bracket starts the  body of the event&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&lt;br /&gt;
      }&lt;br /&gt;
      // closed curly bracked closes the state_entry event&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
      }&lt;br /&gt;
      // end of touch start&lt;br /&gt;
 }&lt;br /&gt;
 // Code end&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;state_entry&amp;quot; event which in turn runs the function llSay() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;touch_start&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Lets look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
 default //default state is mandatory&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // runs each time the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
      llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
      // note the semicolons at the end of each instruction.&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
      {&lt;br /&gt;
      state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
 } // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
 state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // this is run as soon as the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
      llSetColor(&amp;lt;0,0,0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      state default;&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;default&amp;quot; all new states begin with the word &amp;quot;state&amp;quot;. Also, while the object has a texture, the color will effect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;state_entry&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
 [[LSL_llSay|llSay]](0, &amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
 llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES);&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1&#039;s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;touch_start&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
 state off;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
llWhisper( ) is just like llSay( ) but only broadcasts at half the distance. You still must state what channel. So....&lt;br /&gt;
&lt;br /&gt;
 llWhisper(0,&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using llShout( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
llOwnerSay( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
 llOwnerSay(&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via llSetText( ) like this.&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1,1,1&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1,1,1&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0,0,0&amp;gt; means &amp;quot;black&amp;quot;. Replace the llSay(0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0,0,0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=9413</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=9413"/>
		<updated>2007-02-10T17:18:11Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: I&amp;#039;ll just rephrase that. :-)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHO THIS TUTORIAL IS FOR:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life. LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own. You will need to be familiar with the basic principles of Second Life and general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. Scripts in Second Life are a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL unique is its heavy emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life objects have &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;. Events are not user defined in Second Life but rather predefined in LSL. One called Touch_start(), will trigger the code in it when the object running the script is touched. So the minimum LSL program must have one state with one event in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
           llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
(note: all scripts will be placed in LSL tags when it goes active)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &amp;quot;create&amp;quot;. (for one button macs use command+click)&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &amp;quot;wand&amp;quot; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &amp;quot;edit&amp;quot; mode and an edit window will pop up.&lt;br /&gt;
(Note: to place a script in an existing object, right click it and hit edit to open the edit window.)&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &amp;quot;more&amp;gt;&amp;gt;&amp;gt;&amp;quot; click it to reveal five tabs marked general, object, features, content, and texture. Click &amp;quot;content&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &amp;quot;new script&amp;quot; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &amp;quot;save&amp;quot; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot;&lt;br /&gt;
(make sure the &amp;quot;edit&amp;quot; building window is closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and reseting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car.... while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 // contents of state go here&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state playing&lt;br /&gt;
 {&lt;br /&gt;
 // this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;state_entry&amp;quot; which is triggered by the state being entered, and &amp;quot;touch_start&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 // Code start&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      // this is an event&lt;br /&gt;
      {&lt;br /&gt;
      // this is the content of the event&lt;br /&gt;
      }&lt;br /&gt;
      // end of event&lt;br /&gt;
 }&lt;br /&gt;
 // end of state&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lower case L&#039;s. We&#039;ve seen llSay() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. Copy and paste this to a new script to see it color coded.&lt;br /&gt;
&lt;br /&gt;
 // All Scripts need a Default State&lt;br /&gt;
 default&lt;br /&gt;
 // this open curly bracket denotes the start of the state&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // an event&lt;br /&gt;
      // another curly bracket starts the  body of the event&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&lt;br /&gt;
      }&lt;br /&gt;
      // closed curly bracked closes the state_entry event&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
      }&lt;br /&gt;
      // end of touch start&lt;br /&gt;
 }&lt;br /&gt;
 // Code end&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;state_entry&amp;quot; event which in turn runs the function llSay() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this, the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;touch_start&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Lets look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
 default //default state is mandatory&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // runs each time the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
      llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
      // note the semicolons at the end of each instruction.&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
      {&lt;br /&gt;
      state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
 } // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
 state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // this is run as soon as the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
      llSetColor(&amp;lt;0,0,0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      state default;&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;default&amp;quot; all new states begin with the word &amp;quot;state&amp;quot;. Also, while the object has a texture, the color will effect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;state_entry&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
 [[LSL_llSay|llSay]](0, &amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
 llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES);&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1&#039;s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
At this point the event is finished with the two lines of commands.  Then the script waits idle in the default state for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;touch_start&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
 state off;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
llWhisper( ) is just like llSay( ) but only broadcasts at half the distance. You still must state what channel. So....&lt;br /&gt;
&lt;br /&gt;
 llWhisper(0,&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using llShout( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
llOwnerSay( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
 llOwnerSay(&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via llSetText( ) like this.&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1,1,1&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1,1,1&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0,0,0&amp;gt; means &amp;quot;black&amp;quot;. Replace the llSay(0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0,0,0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=9411</id>
		<title>Getting started with LSL</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Getting_started_with_LSL&amp;diff=9411"/>
		<updated>2007-02-10T17:13:16Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: period goes after quotes in this case.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header|{{LSLGC|Tutorials}}}}&lt;br /&gt;
&lt;br /&gt;
== Getting started in LSL scripting in Second Life ==&lt;br /&gt;
&lt;br /&gt;
LSL stands for &amp;quot;Linden Scripting Language&amp;quot; and is used to script the objects you will encounter and make in Second Life.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHO THIS TUTORIAL IS FOR:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for those who have never programmed before, Second Life or elsewhere. However, this tutorial will make little sense outside of Second Life. LSL is very specific to Second Life.&lt;br /&gt;
&lt;br /&gt;
You will begin by running the standard &amp;quot;hello world&amp;quot; script and eventually move towards making your own. You will need to be familiar with the basic principles of Second Life and general building skills before you can make use of everything in this tutorial.&lt;br /&gt;
&lt;br /&gt;
== What is LSL? ==&lt;br /&gt;
&lt;br /&gt;
LSL is the Linden Scripting Language. This is the language all scripts in Second Life are written in. Its structure is based on Java and C. Scripts in Second Life are a set of instructions that can be placed inside any primitive object in the world, but not inside an avatar. Avatars, however, can wear scripted objects.  LSL scripts are written with a built-in editor/compiler which we will access in &amp;quot;Running Your First Script&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
One thing that makes LSL unique is its heavy emphasis on &amp;quot;States&amp;quot; and &amp;quot;Events&amp;quot;. A door can be &amp;quot;open&amp;quot; or &amp;quot;closed&amp;quot; and a light can be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;. A person can be &amp;quot;hyper&amp;quot;, &amp;quot;calm&amp;quot;, or &amp;quot;bored&amp;quot;. Many real life objects have &amp;quot;states&amp;quot; and the same can be true for LSL programs. Minimally a script will have one state, the default state.&lt;br /&gt;
&lt;br /&gt;
An event can be thought of as a &amp;quot;Trigger&amp;quot;. Events are not user defined in Second Life but rather predefined in LSL. One called Touch_start(), will trigger the code in it when the object running the script is touched. So the minimum LSL program must have one state with one event in it. Here is a look at a minimal program written in LSL that can loosely be translated as....&amp;quot;When I am in the default state, and I am touched, say &amp;quot;Hello World&amp;quot; on channel zero&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
           llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
(note: all scripts will be placed in LSL tags when it goes active)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
          llSay(0,&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHAT CAN I DO WITH SCRIPTS?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripts can make an object move, listen, talk, operate as a vehicle or weapon, change color, size or shape. A script can make an object listen to your words as well as talk back to you, scripts even let objects talk to each other.&lt;br /&gt;
&lt;br /&gt;
The most basic object in Second Life is the &amp;quot;Prim&amp;quot; or primitive, the basic building block of all objects you can build in Second Life. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. These are faster and more private than having objects &amp;quot;chat&amp;quot; or email each other. These are beyond the scope of this tutorial and we will instead focus on single scripts in a single prim.&lt;br /&gt;
&lt;br /&gt;
Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve built in Second Life, everything you can define in the edit window can be defined in a script. All interaction you see between objects or between avatars and objects is via scripts.&lt;br /&gt;
&lt;br /&gt;
Learning more about the world and building model is vital to some aspects of scripting, thus I&#039;d recommend a good foundation in building as you learn to script.&lt;br /&gt;
&lt;br /&gt;
== Running Your First Script ==&lt;br /&gt;
&lt;br /&gt;
Traditionally one starts by writing the smallest program possible to print &amp;quot;hello world&amp;quot;. Since LSL only runs inside objects, you must know how to create an object and put a script inside it.&lt;br /&gt;
&lt;br /&gt;
You must be on land which allows building. Either your own land, or land where you have permission to build on such as a sandbox. Right click on the ground and choose &amp;quot;create&amp;quot;. (for one button macs use command+click)&lt;br /&gt;
&lt;br /&gt;
By default, you should see a &amp;quot;wand&amp;quot; icon with which you can click and create a cube on the ground.&lt;br /&gt;
&lt;br /&gt;
You will automatically enter &amp;quot;edit&amp;quot; mode and an edit window will pop up.&lt;br /&gt;
(Note: to place a script in an existing object, right click it and hit edit to open the edit window.)&lt;br /&gt;
&lt;br /&gt;
In the edit window you may see a button marked &amp;quot;more&amp;gt;&amp;gt;&amp;gt;&amp;quot; click it to reveal five tabs marked general, object, features, content, and texture. Click &amp;quot;content&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This window shows the contents of an object which can hold scripts, notecards, even other objects. Press &amp;quot;new script&amp;quot; to add a new script.&lt;br /&gt;
&lt;br /&gt;
This will open the LSL editor with a default script. This editor will color code your syntax and provide some info about keywords when you hold your mouse over them. It will also do basic syntax checking.&lt;br /&gt;
&lt;br /&gt;
Before explaining the code, lets run it. Hit &amp;quot;save&amp;quot; and close your edit window (not the LSL editor window).&lt;br /&gt;
&lt;br /&gt;
You should see the words &amp;quot;Hello Avatar&amp;quot; from &amp;quot;object&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you touch the object, it will say &amp;quot;Touched.&amp;quot;&lt;br /&gt;
(make sure the &amp;quot;edit&amp;quot; building window is closed for touching to work.&lt;br /&gt;
&lt;br /&gt;
Congratulations! You have compiled and run your first LSL script!&lt;br /&gt;
&lt;br /&gt;
== Wash / Rinse / Repeat ==&lt;br /&gt;
&lt;br /&gt;
We now have a running script, however most scripts you make won&#039;t run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit &amp;quot;save&amp;quot; on a script, the LSL editor &amp;quot;compiles&amp;quot; the code to something LSL can understand. It will stop however if it finds an error.&lt;br /&gt;
&lt;br /&gt;
Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programmer in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.&lt;br /&gt;
&lt;br /&gt;
The script you made runs the instant you hit save. If you take it into inventory, it will &amp;quot;suspend&amp;quot; what it was doing but go right back to it when rezzed again. (If you are not familiar with &amp;quot;taking&amp;quot; and &amp;quot;rezzing&amp;quot; an object you may need to revisit your building skills).&lt;br /&gt;
&lt;br /&gt;
Each time you re-write your code you&#039;ll want to reset the script.&lt;br /&gt;
&lt;br /&gt;
Try resetting the script in the following ways.&lt;br /&gt;
&lt;br /&gt;
1. Press Reset in the script window.&lt;br /&gt;
2. Select the object and go to TOOLS&amp;gt;RESET SCRIPTS IN SELECTION&lt;br /&gt;
&lt;br /&gt;
Also try stopping and starting the script from running via checking and unchecking the &amp;quot;running&amp;quot; button, or the TOOLS&amp;gt;SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS&amp;gt;SET SCRIPTS TO RUNNING IN SELECTION.&lt;br /&gt;
&lt;br /&gt;
Once you get comfortable with stopping, starting, and reseting a script, try changing the words &amp;quot;Hello Avatar&amp;quot; and see what else you can make it say.... for goodness sakes keep it PG.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WHY STOP AND START?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Scripting in Second Life can be a little bit like fixing your car.... while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.&lt;br /&gt;
&lt;br /&gt;
Objects can hold more than one script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!&lt;br /&gt;
&lt;br /&gt;
For simplicity&#039;s sake, the following examples will all be used individually so be sure not to put two or more into the same object.&lt;br /&gt;
&lt;br /&gt;
== A Closer Look ==&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      state_entry()&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The code above contains 2 comments, 1 state, 2 events and 2 functions. Lets look at them individually.&lt;br /&gt;
&lt;br /&gt;
Any line starting with two forward slashes is a comment. It will not run and is used to help you document your code.&lt;br /&gt;
&lt;br /&gt;
 // This is a comment&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;STATES&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;State&amp;quot; in LSL is a section that is running, and waiting for events. Only one state can be active at any one time per script. Every script must have a default state with at least one event in it. Except for the default state, each state is defined by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 // contents of state go here&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state playing&lt;br /&gt;
 {&lt;br /&gt;
 // this is a state called &amp;quot;playing&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EVENTS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Events are inside of states. By &amp;quot;inside&amp;quot; I mean it is between the open and closed curly brackets that represent the body of the state. When that state is active, those events wait to be triggered and run the code inside them. We&#039;ve seen &amp;quot;state_entry&amp;quot; which is triggered by the state being entered, and &amp;quot;touch_start&amp;quot; which is triggered when you, or anyone, touches an object.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the default code.&lt;br /&gt;
&lt;br /&gt;
 // Code start&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      // this is an event&lt;br /&gt;
      {&lt;br /&gt;
      // this is the content of the event&lt;br /&gt;
      }&lt;br /&gt;
      // end of event&lt;br /&gt;
 }&lt;br /&gt;
 // end of state&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;FUNCTIONS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Functions lay inside of events and are either defined by you or built-in. Those built in to LSL all start with two lower case L&#039;s. We&#039;ve seen llSay() so far. Functions take &amp;quot;arguments&amp;quot; or values in the parentheses that follow it. If you hover over the function in the editor, a popup will show that tell you what the function is expecting. In the case of llSay it expects a number and a string. We send it the number zero and the string &amp;quot;Hello, Avatar!&amp;quot; separated by commas. The function is &amp;quot;expecting&amp;quot; a number and strings and won&#039;t take anything else.&lt;br /&gt;
&lt;br /&gt;
== Putting it all together ==&lt;br /&gt;
&lt;br /&gt;
Line by line, here is the hello avatar script. Copy and paste this to a new script to see it color coded.&lt;br /&gt;
&lt;br /&gt;
 // All Scripts need a Default State&lt;br /&gt;
 default&lt;br /&gt;
 // this open curly bracket denotes the start of the state&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // an event&lt;br /&gt;
      // another curly bracket starts the  body of the event&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Hello, Avatar!&amp;quot;); // a  function inside the event&lt;br /&gt;
      }&lt;br /&gt;
      // closed curly bracked closes the state_entry event&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)  // another event inside default state&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;Touched.&amp;quot;); // a function between the brackets of the touch_start body&lt;br /&gt;
      }&lt;br /&gt;
      // end of touch start&lt;br /&gt;
 }&lt;br /&gt;
 // Code end&lt;br /&gt;
&lt;br /&gt;
The instant you save your script, it enters default state, which in turn runs the &amp;quot;state_entry&amp;quot; event which in turn runs the function llSay() which makes the object talk.&lt;br /&gt;
&lt;br /&gt;
After this the program waits idle in the default state until a new event is called.&lt;br /&gt;
&lt;br /&gt;
Touching the box triggers the event &amp;quot;touch_start&amp;quot; which also makes the object speak.&lt;br /&gt;
&lt;br /&gt;
== Introducing States and Events ==&lt;br /&gt;
&lt;br /&gt;
LSL scripts will not run beginning to end. Instead, they will look for a default state and wait for an event. Within those events, there can be a call to go to a new state.&lt;br /&gt;
&lt;br /&gt;
All programs must contain the default state, inside of which must be one event.  Events are triggered either by actions happening to or around the object the script resides in, or are triggered from the script itself.&lt;br /&gt;
&lt;br /&gt;
Lets look at a script with two states with two events in each.&lt;br /&gt;
&lt;br /&gt;
 default //default state is mandatory&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // runs each time the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning on!&amp;quot;); //object speaks!&lt;br /&gt;
      llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES); // sets all sides to most bright&lt;br /&gt;
      // note the semicolons at the end of each instruction.&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      touch_start(integer total_number) // another event with only one function  inside&lt;br /&gt;
      {&lt;br /&gt;
      state off; // sets the script to a new &amp;quot;state&amp;quot; and starts running &amp;quot;state off&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
 } // this curly bracket ends the body of the default state.&lt;br /&gt;
 &lt;br /&gt;
 state off // a second state besides &amp;quot;default&amp;quot;&lt;br /&gt;
 {&lt;br /&gt;
      state_entry() // this is run as soon as the state is entered&lt;br /&gt;
      {&lt;br /&gt;
      llSay(0, &amp;quot;turning off!&amp;quot;);&lt;br /&gt;
      llSetColor(&amp;lt;0,0,0&amp;gt;, ALL_SIDES); // sets all sides as dark as possible&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
      touch_start(integer total_number)&lt;br /&gt;
      {&lt;br /&gt;
      state default;&lt;br /&gt;
      }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
A simplification of this would be&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
 //set color to light and, if touched, enter the &amp;quot;off&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 state off&lt;br /&gt;
 {&lt;br /&gt;
 //set color to dark and, if touched, enter the &amp;quot;default&amp;quot; state.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that after &amp;quot;default&amp;quot; all new states begin with the word &amp;quot;state&amp;quot;. Also, while the object has a texture, the color will effect the &amp;quot;tint&amp;quot; more than the true color.&lt;br /&gt;
&lt;br /&gt;
== A closer look ==&lt;br /&gt;
&lt;br /&gt;
Let&#039;s examine the default state.&lt;br /&gt;
&lt;br /&gt;
First we see the &amp;quot;state_entry&amp;quot; event, which gets triggered each time the default state is entered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SPEAK TO ME!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The first line in the event state_entry is...&lt;br /&gt;
&lt;br /&gt;
 [[LSL_llSay|llSay]](0, &amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This makes the object speak &amp;quot;turning on!&amp;quot; on channel zero. What is channel zero? It is the same channel you see all public chat on.&lt;br /&gt;
&lt;br /&gt;
A semicolon ends the line and yet another instruction follows.&lt;br /&gt;
&lt;br /&gt;
 llSetColor(&amp;lt;1,1,1&amp;gt;, ALL_SIDES);&lt;br /&gt;
&lt;br /&gt;
This turns the prim to its brightest tint. If you take the texture off the prim, you&#039;d see it as bright white; with a texture, it looks &amp;quot;normal.&amp;quot; The three 1&#039;s stand for the Red, Green, and Blue values of the tint.&lt;br /&gt;
&lt;br /&gt;
After that the event is done with the two lines of commands, and the script waits idle in default waiting for more events to happen.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TOUCHED BY AN AVATAR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While idle in the default state a touch will trigger the &amp;quot;touch_start&amp;quot; event.&lt;br /&gt;
&lt;br /&gt;
Inside of the &amp;quot;touch_start&amp;quot; event is only one command:&lt;br /&gt;
&lt;br /&gt;
 state off;&lt;br /&gt;
&lt;br /&gt;
This is a command to move immediately to a new state named &amp;quot;off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This state is defined after the default state and nearly mirrors the default state, except that it turns the prim dark and, when touched, will put the script back into default mode, thus creating a loop.&lt;br /&gt;
&lt;br /&gt;
# Enters default state&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot;&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Enters &amp;quot;state off&amp;quot;&lt;br /&gt;
# Runs code in &amp;quot;state entry&amp;quot; (note in the &amp;quot;off&amp;quot; state&#039;s body)&lt;br /&gt;
# Waits to be touched&lt;br /&gt;
# When touched enters &amp;quot;default&amp;quot; state&lt;br /&gt;
&lt;br /&gt;
Then the whole thing starts over.&lt;br /&gt;
&lt;br /&gt;
== A final word on words ==&lt;br /&gt;
&lt;br /&gt;
Making your object speak is a great way to know what a script is doing, but everyone can hear it for 30m all around you. As you get into more complex scripts this can get pretty noisy! Three alternative ways to see what is going on exist.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SHHHH WHISPER&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
llWhisper( ) is just like llSay( ) but only broadcasts at half the distance. You still must state what channel. So....&lt;br /&gt;
&lt;br /&gt;
 llWhisper(0,&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
...might work a bit to save the sanity of your neighbors.&lt;br /&gt;
&lt;br /&gt;
Using llShout( ) doubles the distance heard, but can cut the amount of friends you have in half. &lt;br /&gt;
&lt;br /&gt;
llOwnerSay( ) uses no channel and is heard only by you. Very useful and can triple the amount of friends you have!&lt;br /&gt;
&lt;br /&gt;
 llOwnerSay(&amp;quot;turning on!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;THE SOUND OF SILENCE&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can make a totally silent message via llSetText( ) like this.&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
What do the numbers mean? The &amp;lt;1,1,1&amp;gt; we&#039;ve seen before. It represents the values for red, green, and blue. For now just know that &amp;lt;1,1,1&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0,0,0&amp;gt; means &amp;quot;black&amp;quot;. Replace the llSay(0,&amp;quot;turning off!&amp;quot;); with...&lt;br /&gt;
&lt;br /&gt;
 llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0,0,0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).&lt;br /&gt;
&lt;br /&gt;
{{LSLC|Tutorials}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8978</id>
		<title>Inworld Locations for Volunteers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8978"/>
		<updated>2007-02-09T01:16:06Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InfoHubs ==&lt;br /&gt;
* {{SLurl/Infohub|Ambat|97|212|59}}&lt;br /&gt;
* {{SLurl/Infohub|Anzere|97|212|59}}&lt;br /&gt;
* {{SLurl/Infohub|Bear|26|181|110|Bear Dream Lodge (Bear Infohub)}}&lt;br /&gt;
* {{SLurl/Infohub|Braunworth|92|155|179}}&lt;br /&gt;
* {{SLurl/Infohub|Calleta|128|206|26|Calleta Hobo Railroad (Calleta Infohub)}}&lt;br /&gt;
* {{SLurl/Infohub|Clementina|184|123|61|Governor Lindens Mansion (Clementina Infohub)}}&lt;br /&gt;
* {{SLurl/Infohub|Hyles|38|30|22|Hyles Swamp (Hyles Infohub)}}&lt;br /&gt;
* {{SLurl/Infohub|Iris|202|125|29|Temple of Iris (Iris Infohub)}}&lt;br /&gt;
* {{SLurl/Infohub|Isabel|44|107|57}}&lt;br /&gt;
* {{SLurl/Infohub|Mahulu|58|193|85}}&lt;br /&gt;
* {{SLurl/Infohub|Mauve|122|184|42}}&lt;br /&gt;
* {{SLurl/Infohub|Miramare|3|24|25}}&lt;br /&gt;
* {{SLurl/Infohub|Ross|34|224|57}}&lt;br /&gt;
* {{SLurl/Infohub|Violet|175|95|26}}&lt;br /&gt;
* {{SLurl/Infohub|Wengen|8|231|85}}&lt;br /&gt;
&lt;br /&gt;
== Welcome Areas ==&lt;br /&gt;
* {{SLurl/WA|Ahern|6|6|40}}&lt;br /&gt;
* {{SLurl/WA|Hangeul|1|4|108}}&lt;br /&gt;
* {{SLurl/WA|Plum|73|250|47}}&lt;br /&gt;
* {{SLurl/WA|Violet|181|94|27|Violet Welcome Area (Temporary)}}&lt;br /&gt;
* {{SLurl/WA|Waterhead|41|78|25}}&lt;br /&gt;
&lt;br /&gt;
== Linden Meeting Spaces ==&lt;br /&gt;
* {{Slurl/simple|Pooley|247|5|39|Pooley Stage}}&lt;br /&gt;
* {{SLurl/simple|Orientation Island Public|127|129|32|Orientation Island (Public)}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Volunteer Support ==&lt;br /&gt;
* {{SLurl/simple|Tenera|208|83|70|Volunteer HQ}}&lt;br /&gt;
* {{SLurl/simple|Portage|24|178|85|Second Life Helper&#039;s Lyceum}}&lt;br /&gt;
* {{SLurl/simple|Pro Racer|144|127|36|Teh Mental House}}: &#039;&#039;Access restricted to mentor, greeter and live helper. Just a peacefull full sim for (spammmmm) stressed volunteers :D. Feel free to build anything cool, if you can find some free space (Sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Help Islands ==&lt;br /&gt;
Please note that only Volunteers can access Help Islands.  However, &amp;quot;Help Island Public&amp;quot; is accessible by anyone.&lt;br /&gt;
* {{SLurl/HI|Public}}&lt;br /&gt;
* {{SLurl/HI}}&lt;br /&gt;
* {{SLurl/HI|2}}&lt;br /&gt;
* {{SLurl/HI|3}}&lt;br /&gt;
* {{SLurl/HI|4}}&lt;br /&gt;
* {{SLurl/HI|5}}&lt;br /&gt;
* {{SLurl/HI|6}}&lt;br /&gt;
* {{SLurl/HI|7}}&lt;br /&gt;
* {{SLurl/HI|8}}&lt;br /&gt;
* {{SLurl/HI|9}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== International Areas ==&lt;br /&gt;
&lt;br /&gt;
=== French ===&lt;br /&gt;
==== Resident owned ====&lt;br /&gt;
* {{SLurl/simple|Gaia|147|124|28|French school - Accueil francophone}}: a full sim with dedicated french helper, classes, and translated notecard. &#039;&#039;(yet another non-profit sim hosted and paid by [[User:kerunix Flan|kerunix Flan]])&#039;&#039;&lt;br /&gt;
* {{SLurl/simple|area 51|138|125|27|Area 51}}: The main french sim. Usually full and laggy, but with usefull ressources, classes and sandbox. (it&#039;s just next to the French School)&lt;br /&gt;
&lt;br /&gt;
==== See Also ====&lt;br /&gt;
These sim are not dedicated to SL Education, but you&#039;ll usually find french helper. Usefull groups dedicated to French support : &amp;quot;cooperation francaise&amp;quot; (over 1000 members).&lt;br /&gt;
&lt;br /&gt;
* {{SLurl/simple|Europe|217|155|75|Europe}}&lt;br /&gt;
* {{SLurl/simple|ile de france|128|104|75|Ile de France}}&lt;br /&gt;
* {{SLurl/simple|Solaria|123|115|75|Loisir Area}}&lt;br /&gt;
* {{SLurl/simple|Trantor|184|24|75|La Playa Del Noob}} (with a linden gallery)&lt;br /&gt;
* {{SLurl/simple|Terminus|149|139|75|SL Ecosystem Working Group}}(international ALife project hosted in french sim)&lt;br /&gt;
* {{SLurl/simple|Wild Vertigo|50|42|75|Wild Vertigo}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
==== Resident owned ====&lt;br /&gt;
* {{SLurl/simple|Pixel Expo II|182|112|28|Deutsches Tutorium}}&lt;br /&gt;
* {{SLurl/simple|Samoa|109|158|557|German Tutorial}}&lt;br /&gt;
* {{SLurl/simple|Die Insel|135|142|22|German Newbie Center}}&lt;br /&gt;
&lt;br /&gt;
=== Korean ===&lt;br /&gt;
==== Linden Lab owned ====&lt;br /&gt;
* {{SLurl/Infohub|Korea1|226|23|25}}&lt;br /&gt;
* {{SLurl/Infohub|Korea2|1|24|25}}&lt;br /&gt;
* {{SLurl/Infohub|Korea3|239|228|25}}&lt;br /&gt;
* {{SLurl/Infohub|Korea4|13|228|25}}&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
==== Resident owned ====&lt;br /&gt;
* {{SLurl/simple|Quantum Fields|84|167|56|Centro de Ayuda en Castellano (Quantum Fields)}}: Center of welcome and orientation for all the ones that speak Spanish. Gifts, help, notecards.. a place where newbies can find friends and clear doubts. &lt;br /&gt;
* {{SLurl/simple|Nangrim|185|246|75|SecondLifeSpain.com (Nangrim)}}: Headquarters of the community of Spanish-speaking residents [http://secondlifespain.com secondlifespain.com]. Newbies can find help, classes, and translated notecards.&lt;br /&gt;
&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* {{SLurl/simple|La Isla|122|129|28|La Isla}}: Great place to take Spanish speakers. Active community and Spanish speaking DJ&#039;s.&lt;br /&gt;
* {{SLurl/simple|Cycnia|168|175|30|Mirando al Mar (Cycnia)}}: A place for make new friends, speak in spanish and have fun. Free  help, spanish notecards..etc.&lt;br /&gt;
* {{SLurl/simple|Ibiza The Island|195|46|21|Ibiza The Island (Spain)}}&lt;br /&gt;
&lt;br /&gt;
===== Spanish speaking Groups =====&lt;br /&gt;
&lt;br /&gt;
There are many groups where people that speak spanish can find help and make friends, some of the most important are: &#039;&#039;&#039;Segunda Vida&#039;&#039;&#039; (founded by long term Resident, Greeter and Mentor [[User:Blueman Steele|Blueman Steele]]), &#039;&#039;&#039;Spanish From Spain=SpaniardS in SL&#039;&#039;&#039; and &#039;&#039;&#039;secondlifespain.com&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Portuguese ===&lt;br /&gt;
&lt;br /&gt;
There are no &amp;quot;permanent&amp;quot; help structures for either Brazilian or Portuguese users, but you can join their respective major groups for more help: &amp;quot;Brasileiros no SL&amp;quot; (for Brazil) and &amp;quot;Tugas no SL&amp;quot; (for Portugal). People there will usually point new users to the most recently built areas with Portuguese content.&lt;br /&gt;
&lt;br /&gt;
There is an island for Brazilian users run by residents called, very appropriately, {{SLurl/simple|Brasil|128|128|0|Brasil}}. Another place is listed as having information for Brazilian users: {{SLurl/simple|Delphi|37|84|26|PSDB - Diretorio SL}}. A low-traffic Portuguese forum is available [http://www.forumpt.com/2/modules/newbb/viewforum.php?forum=4 on www.forumpt.com].&lt;br /&gt;
&lt;br /&gt;
== Note: Some SLURS not working ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;SLURLS not working on two name sims?  Some of these links work when using the templates, others do not.  The only pattern I can see is that the two name Sims seem to break.  The space is parsed as a &amp;quot;+&amp;quot;.  Is this correct?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Second Life Volunteers]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Tutorial&amp;diff=8666</id>
		<title>LSL Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Tutorial&amp;diff=8666"/>
		<updated>2007-02-07T20:21:04Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* External Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Beginner Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[GettingStartedInLSL|Getting Started In LSL]]:&#039;&#039;&#039; Tutorial for absolute beginners.  Basic SL inventory and navigation required.&lt;br /&gt;
&lt;br /&gt;
== In-World Tutorials ==&lt;br /&gt;
&#039;&#039;&#039;[http://slurl.com/secondlife/Daydream%20SE%20Islands/206/40 Free interactive in-world Linden Script Tutorial]:&#039;&#039;&#039; Bromley College have developed a free interactive scripting tutorial exhibition in-world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://slurl.com/secondlife/Daydream%20SE%20Islands/11/79/21/?x=300&amp;amp;y=300&amp;amp;img=http%3A//cd.bromley.ac.uk/bteccourses/sl/images/shimmer_island.jpg&amp;amp;title=Learning%20in%20Virtual%20Reality&amp;amp;msg=Here%20at%20Shimmer%20island%2C%20I%20shall%20be%20exploring%20the%20potential%20of%20Second%20Life%20in%20support%20of%20my%20current%20trials%20with%20the%20Moodle%20vle%20for%20Virtual%20Learning.%20So%20please%20feel%20free%20to%20drop%20in%20for%20a%20chat%20with%20us%20to%20see%20how%20things%20are%20going.%20Regards%20Skipper%20Abel  Bromley College in-world Virtual Learning trials]:&#039;&#039;&#039; Please feel free to come over and look around&lt;br /&gt;
&lt;br /&gt;
== External Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://www.slbuilding.com/Clock_video.html Building a Clock in Second Life - Full Video Tutorial]:&#039;&#039;&#039; Video tutorial for building and scripting a clock.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://www.kan-ed.org/second-life/using-LSL.html Using the Linden Script Language]:&#039;&#039;&#039; A short tutorial from Kan-ed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://johannahyacinth.blogspot.com/2006/12/scripting-basics-part-1.html Scripting Basics (Part 1)]:&#039;&#039;&#039; Scripting basics from Johanna Hyacinth.  Also try [http://johannahyacinth.blogspot.com/2006/12/scripting-basics-part-2_18.html part2] and [http://johannahyacinth.blogspot.com/2006/11/lsl-magic-barrier.html part3].&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Tutorial&amp;diff=8664</id>
		<title>LSL Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Tutorial&amp;diff=8664"/>
		<updated>2007-02-07T20:15:48Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* External Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Beginner Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[GettingStartedInLSL|Getting Started In LSL]]:&#039;&#039;&#039; Tutorial for absolute beginners.  Basic SL inventory and navigation required.&lt;br /&gt;
&lt;br /&gt;
== In-World Tutorials ==&lt;br /&gt;
&#039;&#039;&#039;[http://slurl.com/secondlife/Daydream%20SE%20Islands/206/40 Free interactive in-world Linden Script Tutorial]:&#039;&#039;&#039; Bromley College have developed a free interactive scripting tutorial exhibition in-world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://slurl.com/secondlife/Daydream%20SE%20Islands/11/79/21/?x=300&amp;amp;y=300&amp;amp;img=http%3A//cd.bromley.ac.uk/bteccourses/sl/images/shimmer_island.jpg&amp;amp;title=Learning%20in%20Virtual%20Reality&amp;amp;msg=Here%20at%20Shimmer%20island%2C%20I%20shall%20be%20exploring%20the%20potential%20of%20Second%20Life%20in%20support%20of%20my%20current%20trials%20with%20the%20Moodle%20vle%20for%20Virtual%20Learning.%20So%20please%20feel%20free%20to%20drop%20in%20for%20a%20chat%20with%20us%20to%20see%20how%20things%20are%20going.%20Regards%20Skipper%20Abel  Bromley College in-world Virtual Learning trials]:&#039;&#039;&#039; Please feel free to come over and look around&lt;br /&gt;
&lt;br /&gt;
== External Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://www.slbuilding.com/Clock_video.html Building a Clock in Second Life - Full Video Tutorial]:&#039;&#039;&#039; Video tutorial for building and scripting a clock.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://www.kan-ed.org/second-life/using-LSL.html Using the Linden Script Language]:&#039;&#039;&#039; A short tutorial from Kan-ed.&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Tutorial&amp;diff=8663</id>
		<title>LSL Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Tutorial&amp;diff=8663"/>
		<updated>2007-02-07T20:10:39Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
== Beginner Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[GettingStartedInLSL|Getting Started In LSL]]:&#039;&#039;&#039; Tutorial for absolute beginners.  Basic SL inventory and navigation required.&lt;br /&gt;
&lt;br /&gt;
== In-World Tutorials ==&lt;br /&gt;
&#039;&#039;&#039;[http://slurl.com/secondlife/Daydream%20SE%20Islands/206/40 Free interactive in-world Linden Script Tutorial]:&#039;&#039;&#039; Bromley College have developed a free interactive scripting tutorial exhibition in-world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://slurl.com/secondlife/Daydream%20SE%20Islands/11/79/21/?x=300&amp;amp;y=300&amp;amp;img=http%3A//cd.bromley.ac.uk/bteccourses/sl/images/shimmer_island.jpg&amp;amp;title=Learning%20in%20Virtual%20Reality&amp;amp;msg=Here%20at%20Shimmer%20island%2C%20I%20shall%20be%20exploring%20the%20potential%20of%20Second%20Life%20in%20support%20of%20my%20current%20trials%20with%20the%20Moodle%20vle%20for%20Virtual%20Learning.%20So%20please%20feel%20free%20to%20drop%20in%20for%20a%20chat%20with%20us%20to%20see%20how%20things%20are%20going.%20Regards%20Skipper%20Abel  Bromley College in-world Virtual Learning trials]:&#039;&#039;&#039; Please feel free to come over and look around&lt;br /&gt;
&lt;br /&gt;
== External Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://www.slbuilding.com/Clock_video.html Building a Clock in Second Life - Full Video Tutorial]:&#039;&#039;&#039; Video tutorial for building and scripting a clock.&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8629</id>
		<title>Inworld Locations for Volunteers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8629"/>
		<updated>2007-02-07T06:10:21Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Spanish */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InfoHubs ==&lt;br /&gt;
* [http://slurl.com/secondlife/Ambat/97/212/59/?msg=Ambat%20Infohub Ambat Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Anzere/82/56/124/?msg=Anzere%20Infohub Anzere Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Bear/26/181/110/?msg=Bear%20Dream%20Lodge%20Infohub Bear Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Braunworth/92/155/179/?msg=Braunworth%20Infohub Braunworth Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Calleta/128/206/26/?msg=Calleta%27s%20Hobo%20Railroad%20Infohub Calleta Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Clementina/184/123/61/?msg=Governor%20Lindens%20Mansion Clementina Infohub]  &lt;br /&gt;
* [http://slurl.com/secondlife/Hyles/38/30/22/?msg=Hyles%20Swamp%20Infohub Hyles Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Iris/202/125/29/?title=Iris_Infohub-Temple_of_Iris Iris Infohub ]&lt;br /&gt;
* [http://slurl.com/secondlife/Isabel/44/107/57/?msg=Isabel%20Infohub Isabel Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mahulu/58/193/85/?msg=Mahulu%20Infohub Mahulu Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mauve/233/184/42/?msg=Mauve%20Infohub Mauve Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Miramare/3/24/25/?msg=Miramare%20Infohub Miramare Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Ross/34/224/57/?msg=Ross%20Infohub Ross Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Violet/175/95/26/?msg=Violet%20Infohub Violet Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Wengen/8/231/85/?msg=Chalet%20Linden Wengen Infohub]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== International Areas ==&lt;br /&gt;
&lt;br /&gt;
=== French ===&lt;br /&gt;
* [http://slurl.com/secondlife/Gaia/147/124/28 French school - Accueil francophone] : a full sim with dedicated french helper, classes, and translated notecard. &#039;&#039;(yet another non-profit sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/area%2051/138/125/27 Area 51] : The main french sim. Usually full and laggy, but with usefull ressources, classes and sandbox. (it&#039;s just next to the French School)&lt;br /&gt;
* See also (still french) : [http://slurl.com/secondlife/ile%20de%20france/128/104/75 Ile de France] , [http://slurl.com/secondlife/Wild%20Vertigo/50/42/75 Wild Vertigo] , [http://slurl.com/secondlife/Europe/217/155/75 Europe] , [http://slurl.com/secondlife/Trantor/184/24/75 La Playa Del Noob](with a linden gallery) , [http://slurl.com/secondlife/Solaria/123/115/75 Loisir Area], [http://slurl.com/secondlife/Terminus/149/139/75 SL Ecosystem Working Group] (international ALife project hosted in french sim) , and Tohama, Nebuleuse, Croix du sud, Aurore. Those sim are not dedicated to SL Education, but you&#039;ll usually find french helper. Usefull groups dedicated to French support : &amp;quot;cooperation francaise&amp;quot; (over 1000 members).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Pixel Expo II&lt;br /&gt;
|x=182&lt;br /&gt;
|y=112&lt;br /&gt;
|z=28&lt;br /&gt;
|title=Deutsches Tutorium&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Samoa&lt;br /&gt;
|x=109&lt;br /&gt;
|y=158&lt;br /&gt;
|z=557&lt;br /&gt;
|title=German Tutorial&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Die Insel&lt;br /&gt;
|x=135&lt;br /&gt;
|y=142&lt;br /&gt;
|z=22&lt;br /&gt;
|title=German Newbie Center&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
=== Korean ===&lt;br /&gt;
* [http://slurl.com/secondlife/Korea1/226/23/25/?msg=Korea1%20Infohub Korea1 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/1/24/25/?msg=Korea2%20Infohub Korea2 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/239/228/25/?msg=Korea3%20Infohub Korea3 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea4/13/228/25/?msg=Korea4%20Infohub Korea4 Infohub]&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
&lt;br /&gt;
* [http://slurl.com/secondlife/La%20Isla/122/129/28/?title=La%20Isla La Isla] : Great place to take Spanish speakers.  Active community and Spanish speaking DJ&#039;s.&lt;br /&gt;
* [http://slurl.com/secondlife/Ibiza%20The%20Island/195/46/21/?title=Ibiza%20The%20Island%20-%20Spain Ibiza The Island (Spain)]:&lt;br /&gt;
&lt;br /&gt;
=== Portuguese ===&lt;br /&gt;
&lt;br /&gt;
There are no &amp;quot;permanent&amp;quot; help structures for either Brazilian or Portuguese users, but you can join their respective major groups for more help: &amp;quot;Brasileiros no SL&amp;quot; (for Brazil) and &amp;quot;Tugas no SL&amp;quot; (for Portugal). People there will usually point new users to the most recently built areas with Portuguese content. There is an island for Brazilian users run by residents called, very appropriately, [http://slurl.com/secondlife/Brasil/128/128/0/?msg=Brasil Brasil]. Another place is listed as having information for Brazilian users: [http://slurl.com/secondlife/Delphi/37/84/26/?msg=PSDB%20-%20Diretorio%20SL PSDB - Diretorio SL]. A low-traffic Portuguese forum is available [http://www.forumpt.com/2/modules/newbb/viewforum.php?forum=4 here].&lt;br /&gt;
&lt;br /&gt;
== Welcome Areas ==&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/6/6/40/?msg=Ahern%20Welcome%20Area Ahern Welcome Area]&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/41/78/25/?msg=Waterhead%20Welcome%20Area Waterhead Welcome Area]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linden Meeting Spaces ==&lt;br /&gt;
* [http://slurl.com/secondlife/Pooley/247/5/39/?msg=Pooley%20Stage Pooley Stage]&lt;br /&gt;
* [http://slurl.com/secondlife/Orientation%20Island%20Public/127/129/23/?msg=Orientation%20Island%20Public Orientation Island Public]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Volunteer Support ==&lt;br /&gt;
* [http://slurl.com/secondlife/Tenera/208/83/70/?title=Second%20Life%20Volunteer%20HQ Volunteer HQ]&lt;br /&gt;
* [http://slurl.com/secondlife/Portage/24/178/85/?title=Second%20Life%20Helper%27s%20Lyceum Second Life Helper&#039;s Lyceum]&lt;br /&gt;
* [http://slurl.com/secondlife/Pro%20Racer/144/127/36/?title=Teh%20Mental%20House Teh Mental House] : &#039;&#039;Access restricted to mentor, greeter and live helper. Just a peacefull full sim for (spammmmm) stressed volunteers :D. Feel free to build anything cool, if you can find some free space (Sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Help Islands ==&lt;br /&gt;
Please note that only Volunteers can access Help Islands.  However, &amp;quot;Help Island Public&amp;quot; is accessible by anyone.&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%20Public/124/124/26/ Help Island Public]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island/124/124/26/ Help Island]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%202/124/124/26/ Help Island 2]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%203/124/124/26/ Help Island 3]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%204/124/124/26/ Help Island 4]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%205/124/124/26/ Help Island 5]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%206/124/124/26/ Help Island 6]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%207/124/124/26/ Help Island 7]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%208/124/124/26/ Help Island 8]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%209/124/124/26/ Help Island 9]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Second Life Volunteers]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8628</id>
		<title>Inworld Locations for Volunteers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8628"/>
		<updated>2007-02-07T06:07:37Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Spanish */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InfoHubs ==&lt;br /&gt;
* [http://slurl.com/secondlife/Ambat/97/212/59/?msg=Ambat%20Infohub Ambat Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Anzere/82/56/124/?msg=Anzere%20Infohub Anzere Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Bear/26/181/110/?msg=Bear%20Dream%20Lodge%20Infohub Bear Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Braunworth/92/155/179/?msg=Braunworth%20Infohub Braunworth Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Calleta/128/206/26/?msg=Calleta%27s%20Hobo%20Railroad%20Infohub Calleta Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Clementina/184/123/61/?msg=Governor%20Lindens%20Mansion Clementina Infohub]  &lt;br /&gt;
* [http://slurl.com/secondlife/Hyles/38/30/22/?msg=Hyles%20Swamp%20Infohub Hyles Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Iris/202/125/29/?title=Iris_Infohub-Temple_of_Iris Iris Infohub ]&lt;br /&gt;
* [http://slurl.com/secondlife/Isabel/44/107/57/?msg=Isabel%20Infohub Isabel Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mahulu/58/193/85/?msg=Mahulu%20Infohub Mahulu Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mauve/233/184/42/?msg=Mauve%20Infohub Mauve Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Miramare/3/24/25/?msg=Miramare%20Infohub Miramare Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Ross/34/224/57/?msg=Ross%20Infohub Ross Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Violet/175/95/26/?msg=Violet%20Infohub Violet Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Wengen/8/231/85/?msg=Chalet%20Linden Wengen Infohub]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== International Areas ==&lt;br /&gt;
&lt;br /&gt;
=== French ===&lt;br /&gt;
* [http://slurl.com/secondlife/Gaia/147/124/28 French school - Accueil francophone] : a full sim with dedicated french helper, classes, and translated notecard. &#039;&#039;(yet another non-profit sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/area%2051/138/125/27 Area 51] : The main french sim. Usually full and laggy, but with usefull ressources, classes and sandbox. (it&#039;s just next to the French School)&lt;br /&gt;
* See also (still french) : [http://slurl.com/secondlife/ile%20de%20france/128/104/75 Ile de France] , [http://slurl.com/secondlife/Wild%20Vertigo/50/42/75 Wild Vertigo] , [http://slurl.com/secondlife/Europe/217/155/75 Europe] , [http://slurl.com/secondlife/Trantor/184/24/75 La Playa Del Noob](with a linden gallery) , [http://slurl.com/secondlife/Solaria/123/115/75 Loisir Area], [http://slurl.com/secondlife/Terminus/149/139/75 SL Ecosystem Working Group] (international ALife project hosted in french sim) , and Tohama, Nebuleuse, Croix du sud, Aurore. Those sim are not dedicated to SL Education, but you&#039;ll usually find french helper. Usefull groups dedicated to French support : &amp;quot;cooperation francaise&amp;quot; (over 1000 members).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Pixel Expo II&lt;br /&gt;
|x=182&lt;br /&gt;
|y=112&lt;br /&gt;
|z=28&lt;br /&gt;
|title=Deutsches Tutorium&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Samoa&lt;br /&gt;
|x=109&lt;br /&gt;
|y=158&lt;br /&gt;
|z=557&lt;br /&gt;
|title=German Tutorial&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Die Insel&lt;br /&gt;
|x=135&lt;br /&gt;
|y=142&lt;br /&gt;
|z=22&lt;br /&gt;
|title=German Newbie Center&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
=== Korean ===&lt;br /&gt;
* [http://slurl.com/secondlife/Korea1/226/23/25/?msg=Korea1%20Infohub Korea1 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/1/24/25/?msg=Korea2%20Infohub Korea2 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/239/228/25/?msg=Korea3%20Infohub Korea3 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea4/13/228/25/?msg=Korea4%20Infohub Korea4 Infohub]&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
&lt;br /&gt;
* [http://slurl.com/secondlife/La%20Isla/122/129/28/?title=La%20Isla La Isla]&lt;br /&gt;
* [http://slurl.com/secondlife/Ibiza%20The%20Island/195/46/21/?title=Ibiza%20The%20Island%20-%20Spain Ibiza The Island (Spain)]&lt;br /&gt;
&lt;br /&gt;
=== Portuguese ===&lt;br /&gt;
&lt;br /&gt;
There are no &amp;quot;permanent&amp;quot; help structures for either Brazilian or Portuguese users, but you can join their respective major groups for more help: &amp;quot;Brasileiros no SL&amp;quot; (for Brazil) and &amp;quot;Tugas no SL&amp;quot; (for Portugal). People there will usually point new users to the most recently built areas with Portuguese content. There is an island for Brazilian users run by residents called, very appropriately, [http://slurl.com/secondlife/Brasil/128/128/0/?msg=Brasil Brasil]. Another place is listed as having information for Brazilian users: [http://slurl.com/secondlife/Delphi/37/84/26/?msg=PSDB%20-%20Diretorio%20SL PSDB - Diretorio SL]. A low-traffic Portuguese forum is available [http://www.forumpt.com/2/modules/newbb/viewforum.php?forum=4 here].&lt;br /&gt;
&lt;br /&gt;
== Welcome Areas ==&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/6/6/40/?msg=Ahern%20Welcome%20Area Ahern Welcome Area]&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/41/78/25/?msg=Waterhead%20Welcome%20Area Waterhead Welcome Area]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linden Meeting Spaces ==&lt;br /&gt;
* [http://slurl.com/secondlife/Pooley/247/5/39/?msg=Pooley%20Stage Pooley Stage]&lt;br /&gt;
* [http://slurl.com/secondlife/Orientation%20Island%20Public/127/129/23/?msg=Orientation%20Island%20Public Orientation Island Public]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Volunteer Support ==&lt;br /&gt;
* [http://slurl.com/secondlife/Tenera/208/83/70/?title=Second%20Life%20Volunteer%20HQ Volunteer HQ]&lt;br /&gt;
* [http://slurl.com/secondlife/Portage/24/178/85/?title=Second%20Life%20Helper%27s%20Lyceum Second Life Helper&#039;s Lyceum]&lt;br /&gt;
* [http://slurl.com/secondlife/Pro%20Racer/144/127/36/?title=Teh%20Mental%20House Teh Mental House] : &#039;&#039;Access restricted to mentor, greeter and live helper. Just a peacefull full sim for (spammmmm) stressed volunteers :D. Feel free to build anything cool, if you can find some free space (Sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Help Islands ==&lt;br /&gt;
Please note that only Volunteers can access Help Islands.  However, &amp;quot;Help Island Public&amp;quot; is accessible by anyone.&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%20Public/124/124/26/ Help Island Public]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island/124/124/26/ Help Island]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%202/124/124/26/ Help Island 2]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%203/124/124/26/ Help Island 3]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%204/124/124/26/ Help Island 4]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%205/124/124/26/ Help Island 5]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%206/124/124/26/ Help Island 6]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%207/124/124/26/ Help Island 7]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%208/124/124/26/ Help Island 8]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%209/124/124/26/ Help Island 9]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Second Life Volunteers]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8627</id>
		<title>Inworld Locations for Volunteers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8627"/>
		<updated>2007-02-07T06:05:51Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InfoHubs ==&lt;br /&gt;
* [http://slurl.com/secondlife/Ambat/97/212/59/?msg=Ambat%20Infohub Ambat Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Anzere/82/56/124/?msg=Anzere%20Infohub Anzere Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Bear/26/181/110/?msg=Bear%20Dream%20Lodge%20Infohub Bear Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Braunworth/92/155/179/?msg=Braunworth%20Infohub Braunworth Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Calleta/128/206/26/?msg=Calleta%27s%20Hobo%20Railroad%20Infohub Calleta Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Clementina/184/123/61/?msg=Governor%20Lindens%20Mansion Clementina Infohub]  &lt;br /&gt;
* [http://slurl.com/secondlife/Hyles/38/30/22/?msg=Hyles%20Swamp%20Infohub Hyles Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Iris/202/125/29/?title=Iris_Infohub-Temple_of_Iris Iris Infohub ]&lt;br /&gt;
* [http://slurl.com/secondlife/Isabel/44/107/57/?msg=Isabel%20Infohub Isabel Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mahulu/58/193/85/?msg=Mahulu%20Infohub Mahulu Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mauve/233/184/42/?msg=Mauve%20Infohub Mauve Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Miramare/3/24/25/?msg=Miramare%20Infohub Miramare Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Ross/34/224/57/?msg=Ross%20Infohub Ross Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Violet/175/95/26/?msg=Violet%20Infohub Violet Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Wengen/8/231/85/?msg=Chalet%20Linden Wengen Infohub]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== International Areas ==&lt;br /&gt;
&lt;br /&gt;
=== French ===&lt;br /&gt;
* [http://slurl.com/secondlife/Gaia/147/124/28 French school - Accueil francophone] : a full sim with dedicated french helper, classes, and translated notecard. &#039;&#039;(yet another non-profit sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/area%2051/138/125/27 Area 51] : The main french sim. Usually full and laggy, but with usefull ressources, classes and sandbox. (it&#039;s just next to the French School)&lt;br /&gt;
* See also (still french) : [http://slurl.com/secondlife/ile%20de%20france/128/104/75 Ile de France] , [http://slurl.com/secondlife/Wild%20Vertigo/50/42/75 Wild Vertigo] , [http://slurl.com/secondlife/Europe/217/155/75 Europe] , [http://slurl.com/secondlife/Trantor/184/24/75 La Playa Del Noob](with a linden gallery) , [http://slurl.com/secondlife/Solaria/123/115/75 Loisir Area], [http://slurl.com/secondlife/Terminus/149/139/75 SL Ecosystem Working Group] (international ALife project hosted in french sim) , and Tohama, Nebuleuse, Croix du sud, Aurore. Those sim are not dedicated to SL Education, but you&#039;ll usually find french helper. Usefull groups dedicated to French support : &amp;quot;cooperation francaise&amp;quot; (over 1000 members).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Pixel Expo II&lt;br /&gt;
|x=182&lt;br /&gt;
|y=112&lt;br /&gt;
|z=28&lt;br /&gt;
|title=Deutsches Tutorium&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Samoa&lt;br /&gt;
|x=109&lt;br /&gt;
|y=158&lt;br /&gt;
|z=557&lt;br /&gt;
|title=German Tutorial&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Die Insel&lt;br /&gt;
|x=135&lt;br /&gt;
|y=142&lt;br /&gt;
|z=22&lt;br /&gt;
|title=German Newbie Center&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
=== Korean ===&lt;br /&gt;
* [http://slurl.com/secondlife/Korea1/226/23/25/?msg=Korea1%20Infohub Korea1 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/1/24/25/?msg=Korea2%20Infohub Korea2 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/239/228/25/?msg=Korea3%20Infohub Korea3 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea4/13/228/25/?msg=Korea4%20Infohub Korea4 Infohub]&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=La Isla&lt;br /&gt;
|x=122&lt;br /&gt;
|y=129&lt;br /&gt;
|z=28&lt;br /&gt;
|title=~:: La Isla ::~&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
* [http://slurl.com/secondlife/Ibiza%20The%20Island/195/46/21/?title=Ibiza%20The%20Island%20-%20Spain Ibiza The Island (Spain)]&lt;br /&gt;
=== Portuguese ===&lt;br /&gt;
&lt;br /&gt;
There are no &amp;quot;permanent&amp;quot; help structures for either Brazilian or Portuguese users, but you can join their respective major groups for more help: &amp;quot;Brasileiros no SL&amp;quot; (for Brazil) and &amp;quot;Tugas no SL&amp;quot; (for Portugal). People there will usually point new users to the most recently built areas with Portuguese content. There is an island for Brazilian users run by residents called, very appropriately, [http://slurl.com/secondlife/Brasil/128/128/0/?msg=Brasil Brasil]. Another place is listed as having information for Brazilian users: [http://slurl.com/secondlife/Delphi/37/84/26/?msg=PSDB%20-%20Diretorio%20SL PSDB - Diretorio SL]. A low-traffic Portuguese forum is available [http://www.forumpt.com/2/modules/newbb/viewforum.php?forum=4 here].&lt;br /&gt;
&lt;br /&gt;
== Welcome Areas ==&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/6/6/40/?msg=Ahern%20Welcome%20Area Ahern Welcome Area]&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/41/78/25/?msg=Waterhead%20Welcome%20Area Waterhead Welcome Area]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linden Meeting Spaces ==&lt;br /&gt;
* [http://slurl.com/secondlife/Pooley/247/5/39/?msg=Pooley%20Stage Pooley Stage]&lt;br /&gt;
* [http://slurl.com/secondlife/Orientation%20Island%20Public/127/129/23/?msg=Orientation%20Island%20Public Orientation Island Public]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Volunteer Support ==&lt;br /&gt;
* [http://slurl.com/secondlife/Tenera/208/83/70/?title=Second%20Life%20Volunteer%20HQ Volunteer HQ]&lt;br /&gt;
* [http://slurl.com/secondlife/Portage/24/178/85/?title=Second%20Life%20Helper%27s%20Lyceum Second Life Helper&#039;s Lyceum]&lt;br /&gt;
* [http://slurl.com/secondlife/Pro%20Racer/144/127/36/?title=Teh%20Mental%20House Teh Mental House] : &#039;&#039;Access restricted to mentor, greeter and live helper. Just a peacefull full sim for (spammmmm) stressed volunteers :D. Feel free to build anything cool, if you can find some free space (Sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Help Islands ==&lt;br /&gt;
Please note that only Volunteers can access Help Islands.  However, &amp;quot;Help Island Public&amp;quot; is accessible by anyone.&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%20Public/124/124/26/ Help Island Public]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island/124/124/26/ Help Island]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%202/124/124/26/ Help Island 2]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%203/124/124/26/ Help Island 3]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%204/124/124/26/ Help Island 4]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%205/124/124/26/ Help Island 5]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%206/124/124/26/ Help Island 6]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%207/124/124/26/ Help Island 7]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%208/124/124/26/ Help Island 8]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%209/124/124/26/ Help Island 9]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Second Life Volunteers]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8626</id>
		<title>Inworld Locations for Volunteers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8626"/>
		<updated>2007-02-07T05:57:39Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InfoHubs ==&lt;br /&gt;
* [http://slurl.com/secondlife/Ambat/97/212/59/?msg=Ambat%20Infohub Ambat Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Anzere/82/56/124/?msg=Anzere%20Infohub Anzere Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Bear/26/181/110/?msg=Bear%20Dream%20Lodge%20Infohub Bear Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Braunworth/92/155/179/?msg=Braunworth%20Infohub Braunworth Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Calleta/128/206/26/?msg=Calleta%27s%20Hobo%20Railroad%20Infohub Calleta Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Clementina/184/123/61/?msg=Governor%20Lindens%20Mansion Clementina Infohub]  &lt;br /&gt;
* [http://slurl.com/secondlife/Hyles/38/30/22/?msg=Hyles%20Swamp%20Infohub Hyles Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Iris/202/125/29/?title=Iris_Infohub-Temple_of_Iris Iris Infohub ]&lt;br /&gt;
* [http://slurl.com/secondlife/Isabel/44/107/57/?msg=Isabel%20Infohub Isabel Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mahulu/58/193/85/?msg=Mahulu%20Infohub Mahulu Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mauve/233/184/42/?msg=Mauve%20Infohub Mauve Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Miramare/3/24/25/?msg=Miramare%20Infohub Miramare Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Ross/34/224/57/?msg=Ross%20Infohub Ross Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Violet/175/95/26/?msg=Violet%20Infohub Violet Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Wengen/8/231/85/?msg=Chalet%20Linden Wengen Infohub]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== International Areas ==&lt;br /&gt;
&lt;br /&gt;
=== French ===&lt;br /&gt;
* [http://slurl.com/secondlife/Gaia/147/124/28 French school - Accueil francophone] : a full sim with dedicated french helper, classes, and translated notecard. &#039;&#039;(yet another non-profit sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/area%2051/138/125/27 Area 51] : The main french sim. Usually full and laggy, but with usefull ressources, classes and sandbox. (it&#039;s just next to the French School)&lt;br /&gt;
* See also (still french) : [http://slurl.com/secondlife/ile%20de%20france/128/104/75 Ile de France] , [http://slurl.com/secondlife/Wild%20Vertigo/50/42/75 Wild Vertigo] , [http://slurl.com/secondlife/Europe/217/155/75 Europe] , [http://slurl.com/secondlife/Trantor/184/24/75 La Playa Del Noob](with a linden gallery) , [http://slurl.com/secondlife/Solaria/123/115/75 Loisir Area], [http://slurl.com/secondlife/Terminus/149/139/75 SL Ecosystem Working Group] (international ALife project hosted in french sim) , and Tohama, Nebuleuse, Croix du sud, Aurore. Those sim are not dedicated to SL Education, but you&#039;ll usually find french helper. Usefull groups dedicated to French support : &amp;quot;cooperation francaise&amp;quot; (over 1000 members).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Pixel Expo II&lt;br /&gt;
|x=182&lt;br /&gt;
|y=112&lt;br /&gt;
|z=28&lt;br /&gt;
|title=Deutsches Tutorium&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Samoa&lt;br /&gt;
|x=109&lt;br /&gt;
|y=158&lt;br /&gt;
|z=557&lt;br /&gt;
|title=German Tutorial&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Die Insel&lt;br /&gt;
|x=135&lt;br /&gt;
|y=142&lt;br /&gt;
|z=22&lt;br /&gt;
|title=German Newbie Center&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
=== Korean ===&lt;br /&gt;
* [http://slurl.com/secondlife/Korea1/226/23/25/?msg=Korea1%20Infohub Korea1 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/1/24/25/?msg=Korea2%20Infohub Korea2 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/239/228/25/?msg=Korea3%20Infohub Korea3 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea4/13/228/25/?msg=Korea4%20Infohub Korea4 Infohub]&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=La Isla&lt;br /&gt;
|x=122&lt;br /&gt;
|y=129&lt;br /&gt;
|z=28&lt;br /&gt;
|title=~:: La Isla ::~&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Ibiza The Island&lt;br /&gt;
|x=195&lt;br /&gt;
|y=46&lt;br /&gt;
|z=21&lt;br /&gt;
|title=Ibiza The Island (Spain)&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
=== Portuguese ===&lt;br /&gt;
&lt;br /&gt;
There are no &amp;quot;permanent&amp;quot; help structures for either Brazilian or Portuguese users, but you can join their respective major groups for more help: &amp;quot;Brasileiros no SL&amp;quot; (for Brazil) and &amp;quot;Tugas no SL&amp;quot; (for Portugal). People there will usually point new users to the most recently built areas with Portuguese content. There is an island for Brazilian users run by residents called, very appropriately, [http://slurl.com/secondlife/Brasil/128/128/0/?msg=Brasil Brasil]. Another place is listed as having information for Brazilian users: [http://slurl.com/secondlife/Delphi/37/84/26/?msg=PSDB%20-%20Diretorio%20SL PSDB - Diretorio SL]. A low-traffic Portuguese forum is available [http://www.forumpt.com/2/modules/newbb/viewforum.php?forum=4 here].&lt;br /&gt;
&lt;br /&gt;
== Welcome Areas ==&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/6/6/40/?msg=Ahern%20Welcome%20Area Ahern Welcome Area]&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/41/78/25/?msg=Waterhead%20Welcome%20Area Waterhead Welcome Area]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linden Meeting Spaces ==&lt;br /&gt;
* [http://slurl.com/secondlife/Pooley/247/5/39/?msg=Pooley%20Stage Pooley Stage]&lt;br /&gt;
* [http://slurl.com/secondlife/Orientation%20Island%20Public/127/129/23/?msg=Orientation%20Island%20Public Orientation Island Public]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Volunteer Support ==&lt;br /&gt;
* [http://slurl.com/secondlife/Tenera/208/83/70/?title=Second%20Life%20Volunteer%20HQ Volunteer HQ]&lt;br /&gt;
* [http://slurl.com/secondlife/Portage/24/178/85/?title=Second%20Life%20Helper%27s%20Lyceum Second Life Helper&#039;s Lyceum]&lt;br /&gt;
* [http://slurl.com/secondlife/Pro%20Racer/144/127/36/?title=Teh%20Mental%20House Teh Mental House] : &#039;&#039;Access restricted to mentor, greeter and live helper. Just a peacefull full sim for (spammmmm) stressed volunteers :D. Feel free to build anything cool, if you can find some free space (Sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Help Islands ==&lt;br /&gt;
Please note that only Volunteers can access Help Islands.  However, &amp;quot;Help Island Public&amp;quot; is accessible by anyone.&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%20Public/124/124/26/ Help Island Public]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island/124/124/26/ Help Island]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%202/124/124/26/ Help Island 2]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%203/124/124/26/ Help Island 3]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%204/124/124/26/ Help Island 4]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%205/124/124/26/ Help Island 5]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%206/124/124/26/ Help Island 6]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%207/124/124/26/ Help Island 7]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%208/124/124/26/ Help Island 8]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%209/124/124/26/ Help Island 9]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Second Life Volunteers]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8625</id>
		<title>Inworld Locations for Volunteers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8625"/>
		<updated>2007-02-07T05:50:18Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* International Areas */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InfoHubs ==&lt;br /&gt;
* [http://slurl.com/secondlife/Ambat/97/212/59/?msg=Ambat%20Infohub Ambat Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Anzere/82/56/124/?msg=Anzere%20Infohub Anzere Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Bear/26/181/110/?msg=Bear%20Dream%20Lodge%20Infohub Bear Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Braunworth/92/155/179/?msg=Braunworth%20Infohub Braunworth Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Calleta/128/206/26/?msg=Calleta%27s%20Hobo%20Railroad%20Infohub Calleta Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Clementina/184/123/61/?msg=Governor%20Lindens%20Mansion Clementina Infohub]  &lt;br /&gt;
* [http://slurl.com/secondlife/Hyles/38/30/22/?msg=Hyles%20Swamp%20Infohub Hyles Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Iris/202/125/29/?title=Iris_Infohub-Temple_of_Iris Iris Infohub ]&lt;br /&gt;
* [http://slurl.com/secondlife/Isabel/44/107/57/?msg=Isabel%20Infohub Isabel Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mahulu/58/193/85/?msg=Mahulu%20Infohub Mahulu Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mauve/233/184/42/?msg=Mauve%20Infohub Mauve Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Miramare/3/24/25/?msg=Miramare%20Infohub Miramare Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Ross/34/224/57/?msg=Ross%20Infohub Ross Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Violet/175/95/26/?msg=Violet%20Infohub Violet Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Wengen/8/231/85/?msg=Chalet%20Linden Wengen Infohub]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== International Areas ==&lt;br /&gt;
&lt;br /&gt;
=== French ===&lt;br /&gt;
* [http://slurl.com/secondlife/Gaia/147/124/28 French school - Accueil francophone] : a full sim with dedicated french helper, classes, and translated notecard. &#039;&#039;(yet another non-profit sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/area%2051/138/125/27 Area 51] : The main french sim. Usually full and laggy, but with usefull ressources, classes and sandbox. (it&#039;s just next to the French School)&lt;br /&gt;
* See also (still french) : [http://slurl.com/secondlife/ile%20de%20france/128/104/75 Ile de France] , [http://slurl.com/secondlife/Wild%20Vertigo/50/42/75 Wild Vertigo] , [http://slurl.com/secondlife/Europe/217/155/75 Europe] , [http://slurl.com/secondlife/Trantor/184/24/75 La Playa Del Noob](with a linden gallery) , [http://slurl.com/secondlife/Solaria/123/115/75 Loisir Area], [http://slurl.com/secondlife/Terminus/149/139/75 SL Ecosystem Working Group] (international ALife project hosted in french sim) , and Tohama, Nebuleuse, Croix du sud, Aurore. Those sim are not dedicated to SL Education, but you&#039;ll usually find french helper. Usefull groups dedicated to French support : &amp;quot;cooperation francaise&amp;quot; (over 1000 members).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Pixel Expo II&lt;br /&gt;
|x=182&lt;br /&gt;
|y=112&lt;br /&gt;
|z=28&lt;br /&gt;
|title=Deutsches Tutorium&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Samoa&lt;br /&gt;
|x=109&lt;br /&gt;
|y=158&lt;br /&gt;
|z=557&lt;br /&gt;
|title=German Tutorial&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Die Insel&lt;br /&gt;
|x=135&lt;br /&gt;
|y=142&lt;br /&gt;
|z=22&lt;br /&gt;
|title=German Newbie Center&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Korean&#039;&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/Korea1/226/23/25/?msg=Korea1%20Infohub Korea1 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/1/24/25/?msg=Korea2%20Infohub Korea2 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/239/228/25/?msg=Korea3%20Infohub Korea3 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea4/13/228/25/?msg=Korea4%20Infohub Korea4 Infohub]&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=La Isla&lt;br /&gt;
|x=122&lt;br /&gt;
|y=129&lt;br /&gt;
|z=28&lt;br /&gt;
|title=~:: La Isla ::~&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
=== Portuguese ===&lt;br /&gt;
&lt;br /&gt;
There are no &amp;quot;permanent&amp;quot; help structures for either Brazilian or Portuguese users, but you can join their respective major groups for more help: &amp;quot;Brasileiros no SL&amp;quot; (for Brazil) and &amp;quot;Tugas no SL&amp;quot; (for Portugal). People there will usually point new users to the most recently built areas with Portuguese content. There is an island for Brazilian users run by residents called, very appropriately, [http://slurl.com/secondlife/Brasil/128/128/0/?msg=Brasil Brasil]. Another place is listed as having information for Brazilian users: [http://slurl.com/secondlife/Delphi/37/84/26/?msg=PSDB%20-%20Diretorio%20SL PSDB - Diretorio SL]. A low-traffic Portuguese forum is available [http://www.forumpt.com/2/modules/newbb/viewforum.php?forum=4 here].&lt;br /&gt;
&lt;br /&gt;
== Welcome Areas ==&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/6/6/40/?msg=Ahern%20Welcome%20Area Ahern Welcome Area]&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/41/78/25/?msg=Waterhead%20Welcome%20Area Waterhead Welcome Area]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linden Meeting Spaces ==&lt;br /&gt;
* [http://slurl.com/secondlife/Pooley/247/5/39/?msg=Pooley%20Stage Pooley Stage]&lt;br /&gt;
* [http://slurl.com/secondlife/Orientation%20Island%20Public/127/129/23/?msg=Orientation%20Island%20Public Orientation Island Public]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Volunteer Support ==&lt;br /&gt;
* [http://slurl.com/secondlife/Tenera/208/83/70/?title=Second%20Life%20Volunteer%20HQ Volunteer HQ]&lt;br /&gt;
* [http://slurl.com/secondlife/Portage/24/178/85/?title=Second%20Life%20Helper%27s%20Lyceum Second Life Helper&#039;s Lyceum]&lt;br /&gt;
* [http://slurl.com/secondlife/Pro%20Racer/144/127/36/?title=Teh%20Mental%20House Teh Mental House] : &#039;&#039;Access restricted to mentor, greeter and live helper. Just a peacefull full sim for (spammmmm) stressed volunteers :D. Feel free to build anything cool, if you can find some free space (Sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Help Islands ==&lt;br /&gt;
Please note that only Volunteers can access Help Islands.  However, &amp;quot;Help Island Public&amp;quot; is accessible by anyone.&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%20Public/124/124/26/ Help Island Public]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island/124/124/26/ Help Island]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%202/124/124/26/ Help Island 2]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%203/124/124/26/ Help Island 3]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%204/124/124/26/ Help Island 4]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%205/124/124/26/ Help Island 5]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%206/124/124/26/ Help Island 6]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%207/124/124/26/ Help Island 7]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%208/124/124/26/ Help Island 8]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%209/124/124/26/ Help Island 9]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Second Life Volunteers]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8618</id>
		<title>Inworld Locations for Volunteers</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Inworld_Locations_for_Volunteers&amp;diff=8618"/>
		<updated>2007-02-07T02:37:35Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== InfoHubs ==&lt;br /&gt;
* [http://slurl.com/secondlife/Ambat/97/212/59/?msg=Ambat%20Infohub Ambat Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Anzere/82/56/124/?msg=Anzere%20Infohub Anzere Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Bear/26/181/110/?msg=Bear%20Dream%20Lodge%20Infohub Bear Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Braunworth/92/155/179/?msg=Braunworth%20Infohub Braunworth Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Calleta/128/206/26/?msg=Calleta%27s%20Hobo%20Railroad%20Infohub Calleta Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Clementina/184/123/61/?msg=Governor%20Lindens%20Mansion Clementina Infohub]  &lt;br /&gt;
* [http://slurl.com/secondlife/Hyles/38/30/22/?msg=Hyles%20Swamp%20Infohub Hyles Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Iris/202/125/29/?title=Iris_Infohub-Temple_of_Iris Iris Infohub ]&lt;br /&gt;
* [http://slurl.com/secondlife/Isabel/44/107/57/?msg=Isabel%20Infohub Isabel Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mahulu/58/193/85/?msg=Mahulu%20Infohub Mahulu Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Mauve/233/184/42/?msg=Mauve%20Infohub Mauve Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Miramare/3/24/25/?msg=Miramare%20Infohub Miramare Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Ross/34/224/57/?msg=Ross%20Infohub Ross Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Violet/175/95/26/?msg=Violet%20Infohub Violet Infohub]&lt;br /&gt;
* [http://slurl.com/secondlife/Wengen/8/231/85/?msg=Chalet%20Linden Wengen Infohub]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== International Areas ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;French&#039;&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/Gaia/147/124/28 French school - Accueil francophone] : a full sim with dedicated french helper, classes, and translated notecard. &#039;&#039;(yet another non-profit sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/area%2051/138/125/27 Area 51] : The main french sim. Usually full and laggy, but with usefull ressources, classes and sandbox. (it&#039;s just next to the French School)&lt;br /&gt;
* See also (still french) : [http://slurl.com/secondlife/ile%20de%20france/128/104/75 Ile de France] , [http://slurl.com/secondlife/Wild%20Vertigo/50/42/75 Wild Vertigo] , [http://slurl.com/secondlife/Europe/217/155/75 Europe] , [http://slurl.com/secondlife/Trantor/184/24/75 La Playa Del Noob](with a linden gallery) , [http://slurl.com/secondlife/Solaria/123/115/75 Loisir Area], [http://slurl.com/secondlife/Terminus/149/139/75 SL Ecosystem Working Group] (international ALife project hosted in french sim) , and Tohama, Nebuleuse, Croix du sud, Aurore. Those sim are not dedicated to SL Education, but you&#039;ll usually find french helper. Usefull groups dedicated to French support : &amp;quot;cooperation francaise&amp;quot; (over 1000 members).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;German&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Pixel Expo II&lt;br /&gt;
|x=182&lt;br /&gt;
|y=112&lt;br /&gt;
|z=28&lt;br /&gt;
|title=Deutsches Tutorium&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Samoa&lt;br /&gt;
|x=109&lt;br /&gt;
|y=158&lt;br /&gt;
|z=557&lt;br /&gt;
|title=German Tutorial&lt;br /&gt;
|}}&lt;br /&gt;
* {{SLurl&lt;br /&gt;
|region=Die Insel&lt;br /&gt;
|x=135&lt;br /&gt;
|y=142&lt;br /&gt;
|z=22&lt;br /&gt;
|title=German Newbie Center&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Korean&#039;&#039;&#039;&lt;br /&gt;
* [http://slurl.com/secondlife/Korea1/226/23/25/?msg=Korea1%20Infohub Korea1 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/1/24/25/?msg=Korea2%20Infohub Korea2 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea2/239/228/25/?msg=Korea3%20Infohub Korea3 Infohub] &lt;br /&gt;
* [http://slurl.com/secondlife/Korea4/13/228/25/?msg=Korea4%20Infohub Korea4 Infohub]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spanish&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Welcome Areas ==&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/6/6/40/?msg=Ahern%20Welcome%20Area Ahern Welcome Area]&lt;br /&gt;
* [http://slurl.com/secondlife/Waterhead/41/78/25/?msg=Waterhead%20Welcome%20Area Waterhead Welcome Area]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Linden Meeting Spaces ==&lt;br /&gt;
* [http://slurl.com/secondlife/Pooley/247/5/39/?msg=Pooley%20Stage Pooley Stage]&lt;br /&gt;
* [http://slurl.com/secondlife/Orientation%20Island%20Public/127/129/23/?msg=Orientation%20Island%20Public Orientation Island Public]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Volunteer Support ==&lt;br /&gt;
* [http://slurl.com/secondlife/Tenera/208/83/70/?title=Second%20Life%20Volunteer%20HQ Volunteer HQ]&lt;br /&gt;
* [http://slurl.com/secondlife/Portage/24/178/85/?title=Second%20Life%20Helper%27s%20Lyceum Second Life Helper&#039;s Lyceum]&lt;br /&gt;
* [http://slurl.com/secondlife/Pro%20Racer/144/127/36/?title=Teh%20Mental%20House Teh Mental House] : &#039;&#039;Access restricted to mentor, greeter and live helper. Just a peacefull full sim for (spammmmm) stressed volunteers :D. Feel free to build anything cool, if you can find some free space (Sim hosted and paid by &amp;quot;kerunix Flan&amp;quot;)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Help Islands ==&lt;br /&gt;
Please note that only Volunteers can access Help Islands.  However, &amp;quot;Help Island Public&amp;quot; is accessible by anyone.&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%20Public/124/124/26/ Help Island Public]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island/124/124/26/ Help Island]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%202/124/124/26/ Help Island 2]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%203/124/124/26/ Help Island 3]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%204/124/124/26/ Help Island 4]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%205/124/124/26/ Help Island 5]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%206/124/124/26/ Help Island 6]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%207/124/124/26/ Help Island 7]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%208/124/124/26/ Help Island 8]&lt;br /&gt;
* [http://slurl.com/secondlife/Help%20Island%209/124/124/26/ Help Island 9]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Second Life Volunteers]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=8598</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=8598"/>
		<updated>2007-02-06T19:44:51Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|function name = llSetText&lt;br /&gt;
|func_id=llSetText&lt;br /&gt;
|func_sleep=&lt;br /&gt;
|func_energy=&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=String&lt;br /&gt;
|p1_name=text&lt;br /&gt;
|p1d = text to display between the quotes&lt;br /&gt;
|p2_type=Vector&lt;br /&gt;
|p2_name=color&lt;br /&gt;
|p2d = color in RGB enclosed between &amp;lt;&amp;gt; signs, as in &amp;lt;0,0,0&amp;gt; = black, &amp;lt;1,1,1&amp;gt; = white.&lt;br /&gt;
|p3_type=Float&lt;br /&gt;
|p3_name=alpha&lt;br /&gt;
|p3d = visibility, a number between 0 and 1.  0 is fully transparent (invisible), 1.0 is fully visible (opaque).&lt;br /&gt;
llSetText(String text, Vector color, Float alpha);&lt;br /&gt;
&lt;br /&gt;
|func_desc=This function is used to set text to display over an object in SL.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=Displays text placed over object -- programmer specifies text, color and visibility/transparency.&lt;br /&gt;
|caveats=The floating text is a property of the prim and not the script, thus the text will remain if the script is deactivated or removed.  To remove floating text, one must assign an empty string with llSetText(&amp;quot;&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
|examples=&lt;br /&gt;
&lt;br /&gt;
llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;1,1,1&amp;gt; represents the values for red, green, and blue. &amp;lt;1,1,1&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0,0,0&amp;gt; means &amp;quot;black&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0,0,0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible). &lt;br /&gt;
&lt;br /&gt;
Example of how llSetText could be included in default code:&lt;br /&gt;
&lt;br /&gt;
 default&lt;br /&gt;
 {&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
     llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     llSetText(&amp;quot;Prize Box&amp;quot;, &amp;lt;0,1,0&amp;gt;, 1.0);&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
     llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions&lt;br /&gt;
|also&lt;br /&gt;
|notes=Most commonly, this is included in the default code for an object (see example above).&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=8597</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=8597"/>
		<updated>2007-02-06T19:43:16Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|function name = llSetText&lt;br /&gt;
|func_id=llSetText&lt;br /&gt;
|func_sleep=&lt;br /&gt;
|func_energy=&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=String&lt;br /&gt;
|p1_name=text&lt;br /&gt;
|p1d = text to display between the quotes&lt;br /&gt;
|p2_type=Vector&lt;br /&gt;
|p2_name=color&lt;br /&gt;
|p2d = color in RGB enclosed between &amp;lt;&amp;gt; signs, as in &amp;lt;0,0,0&amp;gt; = black, &amp;lt;1,1,1&amp;gt; = white.&lt;br /&gt;
|p3_type=Float&lt;br /&gt;
|p3_name=alpha&lt;br /&gt;
|p3d = visibility, a number between 0 and 1.  0 is fully transparent (invisible), 1.0 is fully visible (opaque).&lt;br /&gt;
llSetText(String text, Vector color, Float alpha);&lt;br /&gt;
&lt;br /&gt;
|func_desc=This function is used to set text to display over an object in SL.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=Displays text placed over object -- programmer specifies text, color and visibility/transparency.&lt;br /&gt;
|caveats=The floating text is a property of the prim and not the script, thus the text will remain if the script is deactivated or removed.  To remove floating text, one must assign an empty string with llSetText(&amp;quot;&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
|examples=&lt;br /&gt;
&lt;br /&gt;
llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;1,1,1&amp;gt; represents the values for red, green, and blue. &amp;lt;1,1,1&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0,0,0&amp;gt; means &amp;quot;black&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0,0,0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible). &lt;br /&gt;
&lt;br /&gt;
Example of how llSetText could be included in default code:&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
     llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     llSetText(&amp;quot;Prize Box&amp;quot;, &amp;lt;0,1,0&amp;gt;, 1.0);&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
     llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions&lt;br /&gt;
|also&lt;br /&gt;
|notes=Most commonly, this is included in the default code for an object (see example above).&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=8596</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=8596"/>
		<updated>2007-02-06T19:39:46Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|function name = llSetText&lt;br /&gt;
|func_id=llSetText&lt;br /&gt;
|func_sleep=&lt;br /&gt;
|func_energy=&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=String&lt;br /&gt;
|p1_name=text&lt;br /&gt;
|p1d = text to display between the quotes&lt;br /&gt;
|p2_type=Vector&lt;br /&gt;
|p2_name=color&lt;br /&gt;
|p2d = color in RGB enclosed between &amp;lt;&amp;gt; signs, as in &amp;lt;0,0,0&amp;gt; = black, &amp;lt;1,1,1&amp;gt; = white.&lt;br /&gt;
|p3_type=Float&lt;br /&gt;
|p3_name=alpha&lt;br /&gt;
|p3d = visibility, a number between 0 and 1.  0 is fully transparent (invisible), 1.0 is fully visible (opaque).&lt;br /&gt;
llSetText(String text, Vector color, Float alpha);&lt;br /&gt;
&lt;br /&gt;
|func_desc=This function is used to set text to display over an object in SL.&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=Displays text placed over object -- programmer specifies text, color and visibility/transparency.&lt;br /&gt;
|caveats=None known.&lt;br /&gt;
|examples=&lt;br /&gt;
&lt;br /&gt;
llSetText(&amp;quot;I am on&amp;quot;, &amp;lt;1,1,1&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;1,1,1&amp;gt; represents the values for red, green, and blue. &amp;lt;1,1,1&amp;gt;, means &amp;quot;white&amp;quot; and &amp;lt;0,0,0&amp;gt; means &amp;quot;black&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
llSetText(&amp;quot;I am off&amp;quot;, &amp;lt;0,0,0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible). &lt;br /&gt;
&lt;br /&gt;
Example of how llSetText could be included in default code:&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
     llSay(0, &amp;quot;Hello, Avatar!&amp;quot;);&lt;br /&gt;
     llSetText(&amp;quot;Prize Box&amp;quot;, &amp;lt;0,1,0&amp;gt;, 1.0);&lt;br /&gt;
 &lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     touch_start(integer total_number)&lt;br /&gt;
     {&lt;br /&gt;
     llSay(0, &amp;quot;Touched.&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions&lt;br /&gt;
|also&lt;br /&gt;
|notes=Most commonly, this is included in the default code for an object (see example above).&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Tutorial&amp;diff=8577</id>
		<title>LSL Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Tutorial&amp;diff=8577"/>
		<updated>2007-02-06T17:26:00Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[GettingStartedInLSL|Getting Started In LSL]]:&#039;&#039;&#039; Tutorial for absolute beginners.  Basic SL inventory and navigation required.&lt;br /&gt;
&lt;br /&gt;
== In-World Tutorials ==&lt;br /&gt;
&#039;&#039;&#039;[http://slurl.com/secondlife/Daydream%20SE%20Islands/206/40 Free interactive in-world Linden Script Tutorial]:&#039;&#039;&#039; Bromley College have developed a free interactive scripting tutorial exhibition in-world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://slurl.com/secondlife/Daydream%20SE%20Islands/11/79/21/?x=300&amp;amp;y=300&amp;amp;img=http%3A//cd.bromley.ac.uk/bteccourses/sl/images/shimmer_island.jpg&amp;amp;title=Learning%20in%20Virtual%20Reality&amp;amp;msg=Here%20at%20Shimmer%20island%2C%20I%20shall%20be%20exploring%20the%20potential%20of%20Second%20Life%20in%20support%20of%20my%20current%20trials%20with%20the%20Moodle%20vle%20for%20Virtual%20Learning.%20So%20please%20feel%20free%20to%20drop%20in%20for%20a%20chat%20with%20us%20to%20see%20how%20things%20are%20going.%20Regards%20Skipper%20Abel  Bromley College in-world Virtual Learning trials]:&#039;&#039;&#039; Please feel free to come over and look around&lt;br /&gt;
&lt;br /&gt;
== External Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[http://www.slbuilding.com/Clock_video.html Building a Clock in Second Life - Full Video Tutorial]:&#039;&#039;&#039; Video tutorial for building and scripting a clock.&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=List_of_external_tutorials&amp;diff=8571</id>
		<title>List of external tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=List_of_external_tutorials&amp;diff=8571"/>
		<updated>2007-02-06T17:19:47Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{old-info}}&lt;br /&gt;
&lt;br /&gt;
== Alpha Channels ==&lt;br /&gt;
* [http://forums.secondlife.com/showthread.php?t=80851 Alpha channels: the definitive guide]&lt;br /&gt;
* [http://www.nicolaescher.com/tutorials.php Clothing, alpha channels, maniquinn]&lt;br /&gt;
* [http://forums.secondlife.com/showthread.php?t=12684&amp;amp;highlight=tutorial Basic clothing tutorial by owner of Pixel Dolls]&lt;br /&gt;
* [http://wave.prohosting.com/shebangs/alpha-psp.html Alpha Channels in PSP]&lt;br /&gt;
* [http://www.robinwood.com/Catalog/Technical/SL-Tuts/SLPages/SLTranspStart.html Alpha Channels in PS CS]&lt;br /&gt;
* [http://www.spacethinkdream.com/articles/article/6/alpha-channel-primer Alpha channel tutorial]&lt;br /&gt;
* [http://forums.secondlife.com/showthread.php?t=40762&amp;amp;highlight=templates BETTER CLOTHING TEMPLATES]&lt;br /&gt;
&lt;br /&gt;
[[Category:Text from In-world Notecards]]&lt;br /&gt;
[[Category:Articles in need of expansion]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=List_of_external_tutorials&amp;diff=8570</id>
		<title>List of external tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=List_of_external_tutorials&amp;diff=8570"/>
		<updated>2007-02-06T17:16:27Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Alpha Channels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{old-info}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
[http://www.slbuilding.com/Clock_video.html Building a Clock in Second Life - Full Video Tutorial] (added 02/06/2007)&lt;br /&gt;
&lt;br /&gt;
== Alpha Channels ==&lt;br /&gt;
* [http://forums.secondlife.com/showthread.php?t=80851 Alpha channels: the definitive guide]&lt;br /&gt;
* [http://www.nicolaescher.com/tutorials.php Clothing, alpha channels, maniquinn]&lt;br /&gt;
* [http://forums.secondlife.com/showthread.php?t=12684&amp;amp;highlight=tutorial Basic clothing tutorial by owner of Pixel Dolls]&lt;br /&gt;
* [http://wave.prohosting.com/shebangs/alpha-psp.html Alpha Channels in PSP]&lt;br /&gt;
* [http://www.robinwood.com/Catalog/Technical/SL-Tuts/SLPages/SLTranspStart.html Alpha Channels in PS CS]&lt;br /&gt;
* [http://www.spacethinkdream.com/articles/article/6/alpha-channel-primer Alpha channel tutorial]&lt;br /&gt;
* [http://forums.secondlife.com/showthread.php?t=40762&amp;amp;highlight=templates BETTER CLOTHING TEMPLATES]&lt;br /&gt;
&lt;br /&gt;
[[Category:Text from In-world Notecards]]&lt;br /&gt;
[[Category:Articles in need of expansion]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Useful_Function_WishList&amp;diff=8569</id>
		<title>LSL Useful Function WishList</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Useful_Function_WishList&amp;diff=8569"/>
		<updated>2007-02-06T17:02:58Z</updated>

		<summary type="html">&lt;p&gt;Blueman Steele: /* Other functionality */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
==A==&lt;br /&gt;
{{LSLG|llAddToEstateBanList}}&lt;br /&gt;
==G==&lt;br /&gt;
{{LSLG|llGetParcelBanList}}&lt;br /&gt;
{{LSLG|llGetEstateBanList}}&lt;br /&gt;
{{LSLG|llGetAvatarKeysOnParcel}}&lt;br /&gt;
{{LSLG|llGetAvatarKeysOnEstate}}&lt;br /&gt;
{{LSLG|llGetMyAccountBalance}}&lt;br /&gt;
==N==&lt;br /&gt;
{{LSLG|llName2Key}}&lt;br /&gt;
==P==&lt;br /&gt;
{{LSLG|llPizza}}&lt;br /&gt;
==R==&lt;br /&gt;
{{LSLG|llRemoveFromEstateBanList}}&lt;br /&gt;
{{LSLG|llReturnObject}}&lt;br /&gt;
{{LSLG|llReturnOwnersObjects}}&lt;br /&gt;
==T==&lt;br /&gt;
{{LSLG|llTeleportAgent}}&lt;br /&gt;
==Other functionality==&lt;br /&gt;
{{LSLG|Block comments}}&lt;br /&gt;
{{LSLG|True tab-stops}}&lt;br /&gt;
{{LSLG|Code Folding}}&lt;/div&gt;</summary>
		<author><name>Blueman Steele</name></author>
	</entry>
</feed>