This document provides an introduction to scripting in Second Life using Linden Scripting Language (LSL). It explains what LSL is, how scripts work through states and events, and provides a basic tutorial on writing a simple "hello world" script. The document outlines common LSL concepts like functions, states, events, and how to add scripts to objects in Second Life to make them interactive.
This document provides an introduction to scripting in Second Life using Linden Scripting Language (LSL). It explains that LSL scripts can be placed inside virtual objects to make them interactive. The tutorial then walks through running a simple "Hello World" script, introducing basic LSL concepts like states, events, and functions. It provides examples of using scripts to make objects move, change color, and interact with avatars. The goal is to help newcomers get started with programming in Second Life.
The document provides an overview of scripting in Second Life using Linden Scripting Language (LSL). It demonstrates how to create and modify a basic script with states, events, functions, parameters, data types, comments, and syntax rules. The script is edited to add new functions so that upon an avatar touching the object, the script will display a customized message with the avatar's name to the object owner.
This document provides an overview of Linden Scripting Language (LSL) and how to write basic scripts in Second Life. It explains that scripts can be placed in objects or worn by avatars to make them move, interact, or change properties. Key components of LSL scripts include states, events, functions, and comments. States define sections of code, events trigger actions, functions perform tasks, and comments document the code. The document also provides some simple scripting exercises to try out, like changing an object's color or making it say something.
1) Second Life is a 3D virtual world that can be used as an alternative learning platform to a real classroom.
2) It allows for various teaching techniques like screen sharing, videoconferencing, and programming.
3) Second Life provides an inclusive, cost-effective environment without geographical borders that offers opportunities for creativity, presence, and unlimited learning possibilities through role playing and simulations.
Second Life offers many opportunities for experiential and collaborative learning but also poses some challenges. It allows for creativity and a sense of presence in simulated environments. However, it requires significant computer resources and technical expertise. Successful teaching with Second Life involves careful planning, guidelines for installation, avatar creation and group activities. It is well-suited for language teaching, simulations, and discussions but lectures may not transfer well. Collaboration can help overcome challenges through shared pioneering efforts.
1) The SL Construction tool allows users to create 3D objects called primitives by selecting shapes from a menu and clicking to place them.
2) Objects can be edited using tools to move, rotate, stretch, and select faces. Users can also make copies and precisely rotate objects.
3) In Edit Mode, tabs allow users to name objects, set permissions and properties, add textures and media by selecting faces, and view scripts and contents.
This document provides an introduction to scripting in Second Life using Linden Scripting Language (LSL). It explains that LSL scripts can be placed inside virtual objects to make them interactive. The tutorial then walks through running a simple "Hello World" script, introducing basic LSL concepts like states, events, and functions. It provides examples of using scripts to make objects move, change color, and interact with avatars. The goal is to help newcomers get started with programming in Second Life.
The document provides an overview of scripting in Second Life using Linden Scripting Language (LSL). It demonstrates how to create and modify a basic script with states, events, functions, parameters, data types, comments, and syntax rules. The script is edited to add new functions so that upon an avatar touching the object, the script will display a customized message with the avatar's name to the object owner.
This document provides an overview of Linden Scripting Language (LSL) and how to write basic scripts in Second Life. It explains that scripts can be placed in objects or worn by avatars to make them move, interact, or change properties. Key components of LSL scripts include states, events, functions, and comments. States define sections of code, events trigger actions, functions perform tasks, and comments document the code. The document also provides some simple scripting exercises to try out, like changing an object's color or making it say something.
1) Second Life is a 3D virtual world that can be used as an alternative learning platform to a real classroom.
2) It allows for various teaching techniques like screen sharing, videoconferencing, and programming.
3) Second Life provides an inclusive, cost-effective environment without geographical borders that offers opportunities for creativity, presence, and unlimited learning possibilities through role playing and simulations.
Second Life offers many opportunities for experiential and collaborative learning but also poses some challenges. It allows for creativity and a sense of presence in simulated environments. However, it requires significant computer resources and technical expertise. Successful teaching with Second Life involves careful planning, guidelines for installation, avatar creation and group activities. It is well-suited for language teaching, simulations, and discussions but lectures may not transfer well. Collaboration can help overcome challenges through shared pioneering efforts.
1) The SL Construction tool allows users to create 3D objects called primitives by selecting shapes from a menu and clicking to place them.
2) Objects can be edited using tools to move, rotate, stretch, and select faces. Users can also make copies and precisely rotate objects.
3) In Edit Mode, tabs allow users to name objects, set permissions and properties, add textures and media by selecting faces, and view scripts and contents.
The document discusses different approaches to software testing including Behavior Driven Development (BDD), test-driven development (TDD), and unit testing frameworks. It introduces BDD as a process that focuses on specifying what functionality software should provide from the perspective of end users and domain experts. BDD tools like Cucumber and RSpec are discussed as ways to write automated tests in a readable language that can be understood by non-technical stakeholders. Mocking libraries like Mocha are also presented as a way to isolate layers and collaborations when testing code.
The document provides an overview of Linden Script Language (LSL) by outlining its basic concepts, data types, flow control statements, states, functions, and event handling. LSL is used to attach behaviors to objects in Second Life and has syntax similar to Java with an implicit state machine for each script. Multiple scripts can be attached to an object to create new behaviors by combining specific functions.
This document provides an introduction to the Small Basic programming language environment and teaches the basics of programming through examples. It discusses that Small Basic was created to make programming easy for beginners. It then describes the Small Basic programming environment user interface and walks through a first "Hello World" program. It explains how the program works by breaking it down into statements and objects. The document continues by having the reader modify the program to print in yellow and introduces the concept of variables by having the user input their name and printing it back.
This document provides an introduction to the Small Basic programming language environment and teaches the basics of programming through examples. It discusses that Small Basic was created to make programming easy for beginners. It then describes the Small Basic programming environment and walks through a first "Hello World" program. It explains how the program works by breaking it down into statements and objects. The document introduces variables by having a program ask the user's name and store it in a variable to personalize the output. It teaches how variables allow storing values that can be reused and changed in a program.
1.2 statements, properties, and operationsallenbailey
This document provides an overview of statements, properties, and operations in Microsoft Small Basic programs. It discusses how statements are used to give instructions to the computer. The TextWindow object can have its properties like foreground color and position changed. Operations like Show, Write, Hide can display, write text to, and hide the text window. The document provides examples of using various statements and TextWindow object operations and properties to write simple Small Basic programs.
This document introduces Microsoft Small Basic, a simple programming language designed for beginners. It discusses the Small Basic environment and how to write basic programs. The first program shows how to display "Hello World" by using the TextWindow object. Subsequent programs demonstrate how to get user input, store values in variables, perform math operations, add colors, and use conditional statements to change the output based on the time of day. The goal is to explain programming concepts in a simple, approachable way for new programmers.
This document provides an introduction to programming with Scratch. It discusses what programming is, why people learn to program, and how Scratch allows anyone to program without complicated syntax. It then previews the topics that will be covered in subsequent Scratch lessons, including statements, boolean expressions, conditions, loops, variables, threads, and events. It encourages completing the homework assignments of various Scratch projects.
This covers details on Writing Pascal using Lazarus.
A teaching resource for students without any previous experience.
Originally written for AQA A level Computing (UK exam).
This covers details on Writing Pascal using Lazarus.
A teaching resource for students without any previous experience. Can be used for teaching or direct notes for students (Continued with notes for A2).
Originally written for AQA A level Computing (UK exam).
1) The document provides an introduction to programming concepts like flow charts, libraries, variables, data types, inputs/outputs, and operators.
2) Control structures like if/else, switch, and different types of loops (for, while, do-while) are explained with examples.
3) An assignment is given to write a calculator program that takes two numbers from the user, an operation to perform, performs the calculation, and allows the user to choose another operation or exit.
The document discusses programming concepts including programming languages, switch case statements, and looping. It provides examples of how to write code using switch case statements and different types of loops (for, while, do-while). The examples demonstrate how to get user input, perform calculations, and repeat blocks of code multiple times.
Switch case statements provide an alternative to long if/else statements when comparing a variable to multiple integral values. The basic format compares the variable to case values, executing code for a matching case. A default case handles non-matching values. Loops allow code to repeat, with for, while, and do-while loops. For loops initialize/update a variable and check a condition each repetition. While loops check a condition and repeat until it's false. Loops are useful for repeating tasks like displaying lists of data.
C# is a great programming language for modern development. Like any language, however, there are parts of the language and BCL that can trip you up if you have invalid assumptions as to what is going on behind the scenes. This presentation discusses a few of these pitfalls and how to avoid them.
This document provides an overview of JavaScript. It discusses that JavaScript is an object scripting language used to create dynamic online content. It can be used by HTML authors to dynamically script page behavior on both the client-side and server-side. The document then covers basic JavaScript structures like using the <SCRIPT> tag to embed scripts in HTML and external scripts. It also discusses data types in JavaScript, variable declaration, and other syntax conventions.
This document provides an overview of how to script the DOM using JavaScript. It discusses how the browser parses HTML into a DOM tree, with the window and document objects being the root nodes. It then explains how to access and manipulate DOM elements using the body, JavaScript functions, and events. Finally, it covers creating custom objects and namespacing in JavaScript.
The document discusses programming languages and different types of loops used in programming. It defines programming as using a computer language to develop applications and scripts for a computer to execute. It then describes the different types of loops - for loops, which allow initialization of a variable, checking a condition, and updating the variable; while loops, which repeat code while a condition is true; and do-while loops, which execute code at least once before checking the condition. Examples of each loop type are provided to illustrate their usage.
A presentation given at ACCU 2014.
As software developers we do not just write code. We write many, many words too.
We write documentation, comments, manuals, specifications, technical articles, wiki documentation, and more. Maybe even magazine articles and books.
This talk discusses some practicalities of writing well, both stylistically and practically. We'll talk about prose, but also about the right "geek" way of writing, the storage formats, toolchains, and the storage of our words.
We'll cover:
- writing style
- what's appropriate: what to write what not to write
- keeping track: "source control" for words
- toolchains: what toolsets to use to write and prepare output
- markup languages vs "wysiwyg" tools
- sharing your words with non-geeks
At the end of this talk, you'll have a good idea how to put together an example "document toolchain" taking source-controlled words in a humane markup style, and creating high-quality HTML, PDF (fully styled, print-ready) ePub and Kindle output, as well as Word-friendly versions.
This document provides an overview of the Erlang programming language. It discusses that Erlang is a general purpose, concurrent, functional programming language developed at Ericsson for building distributed, fault-tolerant systems. It notes some of Erlang's key uses in telecommunications, banking, messaging, and e-commerce where high-availability is required. The document also summarizes that Erlang uses processes instead of threads to enable concurrency, and that it relies on recursion rather than loops for iteration due to its functional nature.
The document discusses different approaches to software testing including Behavior Driven Development (BDD), test-driven development (TDD), and unit testing frameworks. It introduces BDD as a process that focuses on specifying what functionality software should provide from the perspective of end users and domain experts. BDD tools like Cucumber and RSpec are discussed as ways to write automated tests in a readable language that can be understood by non-technical stakeholders. Mocking libraries like Mocha are also presented as a way to isolate layers and collaborations when testing code.
The document provides an overview of Linden Script Language (LSL) by outlining its basic concepts, data types, flow control statements, states, functions, and event handling. LSL is used to attach behaviors to objects in Second Life and has syntax similar to Java with an implicit state machine for each script. Multiple scripts can be attached to an object to create new behaviors by combining specific functions.
This document provides an introduction to the Small Basic programming language environment and teaches the basics of programming through examples. It discusses that Small Basic was created to make programming easy for beginners. It then describes the Small Basic programming environment user interface and walks through a first "Hello World" program. It explains how the program works by breaking it down into statements and objects. The document continues by having the reader modify the program to print in yellow and introduces the concept of variables by having the user input their name and printing it back.
This document provides an introduction to the Small Basic programming language environment and teaches the basics of programming through examples. It discusses that Small Basic was created to make programming easy for beginners. It then describes the Small Basic programming environment and walks through a first "Hello World" program. It explains how the program works by breaking it down into statements and objects. The document introduces variables by having a program ask the user's name and store it in a variable to personalize the output. It teaches how variables allow storing values that can be reused and changed in a program.
1.2 statements, properties, and operationsallenbailey
This document provides an overview of statements, properties, and operations in Microsoft Small Basic programs. It discusses how statements are used to give instructions to the computer. The TextWindow object can have its properties like foreground color and position changed. Operations like Show, Write, Hide can display, write text to, and hide the text window. The document provides examples of using various statements and TextWindow object operations and properties to write simple Small Basic programs.
This document introduces Microsoft Small Basic, a simple programming language designed for beginners. It discusses the Small Basic environment and how to write basic programs. The first program shows how to display "Hello World" by using the TextWindow object. Subsequent programs demonstrate how to get user input, store values in variables, perform math operations, add colors, and use conditional statements to change the output based on the time of day. The goal is to explain programming concepts in a simple, approachable way for new programmers.
This document provides an introduction to programming with Scratch. It discusses what programming is, why people learn to program, and how Scratch allows anyone to program without complicated syntax. It then previews the topics that will be covered in subsequent Scratch lessons, including statements, boolean expressions, conditions, loops, variables, threads, and events. It encourages completing the homework assignments of various Scratch projects.
This covers details on Writing Pascal using Lazarus.
A teaching resource for students without any previous experience.
Originally written for AQA A level Computing (UK exam).
This covers details on Writing Pascal using Lazarus.
A teaching resource for students without any previous experience. Can be used for teaching or direct notes for students (Continued with notes for A2).
Originally written for AQA A level Computing (UK exam).
1) The document provides an introduction to programming concepts like flow charts, libraries, variables, data types, inputs/outputs, and operators.
2) Control structures like if/else, switch, and different types of loops (for, while, do-while) are explained with examples.
3) An assignment is given to write a calculator program that takes two numbers from the user, an operation to perform, performs the calculation, and allows the user to choose another operation or exit.
The document discusses programming concepts including programming languages, switch case statements, and looping. It provides examples of how to write code using switch case statements and different types of loops (for, while, do-while). The examples demonstrate how to get user input, perform calculations, and repeat blocks of code multiple times.
Switch case statements provide an alternative to long if/else statements when comparing a variable to multiple integral values. The basic format compares the variable to case values, executing code for a matching case. A default case handles non-matching values. Loops allow code to repeat, with for, while, and do-while loops. For loops initialize/update a variable and check a condition each repetition. While loops check a condition and repeat until it's false. Loops are useful for repeating tasks like displaying lists of data.
C# is a great programming language for modern development. Like any language, however, there are parts of the language and BCL that can trip you up if you have invalid assumptions as to what is going on behind the scenes. This presentation discusses a few of these pitfalls and how to avoid them.
This document provides an overview of JavaScript. It discusses that JavaScript is an object scripting language used to create dynamic online content. It can be used by HTML authors to dynamically script page behavior on both the client-side and server-side. The document then covers basic JavaScript structures like using the <SCRIPT> tag to embed scripts in HTML and external scripts. It also discusses data types in JavaScript, variable declaration, and other syntax conventions.
This document provides an overview of how to script the DOM using JavaScript. It discusses how the browser parses HTML into a DOM tree, with the window and document objects being the root nodes. It then explains how to access and manipulate DOM elements using the body, JavaScript functions, and events. Finally, it covers creating custom objects and namespacing in JavaScript.
The document discusses programming languages and different types of loops used in programming. It defines programming as using a computer language to develop applications and scripts for a computer to execute. It then describes the different types of loops - for loops, which allow initialization of a variable, checking a condition, and updating the variable; while loops, which repeat code while a condition is true; and do-while loops, which execute code at least once before checking the condition. Examples of each loop type are provided to illustrate their usage.
A presentation given at ACCU 2014.
As software developers we do not just write code. We write many, many words too.
We write documentation, comments, manuals, specifications, technical articles, wiki documentation, and more. Maybe even magazine articles and books.
This talk discusses some practicalities of writing well, both stylistically and practically. We'll talk about prose, but also about the right "geek" way of writing, the storage formats, toolchains, and the storage of our words.
We'll cover:
- writing style
- what's appropriate: what to write what not to write
- keeping track: "source control" for words
- toolchains: what toolsets to use to write and prepare output
- markup languages vs "wysiwyg" tools
- sharing your words with non-geeks
At the end of this talk, you'll have a good idea how to put together an example "document toolchain" taking source-controlled words in a humane markup style, and creating high-quality HTML, PDF (fully styled, print-ready) ePub and Kindle output, as well as Word-friendly versions.
This document provides an overview of the Erlang programming language. It discusses that Erlang is a general purpose, concurrent, functional programming language developed at Ericsson for building distributed, fault-tolerant systems. It notes some of Erlang's key uses in telecommunications, banking, messaging, and e-commerce where high-availability is required. The document also summarizes that Erlang uses processes instead of threads to enable concurrency, and that it relies on recursion rather than loops for iteration due to its functional nature.
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
2. Getting started in scripting in Second Life LSL stands for "Linden Scripting Language" LSL is used to script the objects you will make in Second Life. This tutorial is intended for those who have never programmed before in Second Life or elsewhere. Scripting is harder to learn than basic object manipulation, but is very rewarding once you make progress. You will begin by running the standard “Hello Avatar " script and eventually move towards making your own.
3. What is LSL? Linden Scripting Language’s structure is based on Java and C. Scripts in Second Life are a set of instructions that can be placed inside any object in the world, or any object worn by an avatar, but not inside an avatar. They are written with a built-in editor/compiler. LSL has heavy emphasis on "States" and "Events". Many real life objects have "states" A door can be "open" or "closed" and a light can be "on" or "off". A person can be "hyper", "calm", or "bored". a script will have at least one state, the default state. An event can be thought of as a "Trigger". Events are predefined in LSL. Touch_start(), will trigger the code in it when the object having the script is touched.
4. WHAT CAN I DO WITH SCRIPTS? Scripts can make an object: Move Listen Talk Operate as a car or gun Change color, size or shape Talk to you Talk to another.
5. WHAT CAN I DO WITH SCRIPTS? "Prim" or primitive, the basic building block can have a script. When several prims are linked, they can each contain a script which speaks to the rest of the object via Link Messages. Here we focus on single scripts in a single prim. If you'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. Learning more about the world and building model is vital to some aspects of scripting
6. Running Your First Script Traditionally one starts by writing the smallest program to print "hello world“. Since LSL only runs inside objects, you must know how to make an object and put a script inside it. You must be on land which allows building. In the edit window you may five tabs marked general, object, features, content, and texture. Click "content".
7. Running Your First Script Press "new script" to add a new script. 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. Hit "save" and close your edit window (not the LSL editor window) You should see the words "Hello Avatar" from "object“ If you touch the object, it will say "Touched.“ (make sure the "edit" building window is closed for touching to work. GOOD! You have compiled and run your first LSL script!
8. The script: When I am in the default state, and I am touched, say "Hello World" on channel zero".
9. Write, run, RE-write Most scripts you make won't run the first time you run them. When you hit "save" on a script, the LSL editor "compiles" the code to form LSL can understand. It stops if it finds an error. Brackets, parenthesis, and semicolons must all be perfectly in place If you are new to programming this can be frustrating Part of a programming 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. The script you made runs the instant you hit save. If you take it into inventory, it will "suspend" what it was doing but go right back to it when rezzedagain Each time you re-write your code you must save the script.
11. STATES A "State" 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 define by the word STATE followed by the name of the state. The contents of the state are enclosed in two curly brackets.
12. EVENTS Events are inside of states. When a state is active, those events wait to be triggered and run the code inside them. "state entry" which is trigged by the a state being entered "touch start" which is triggered when you, or anyone, touches an object. Lets take a look at the default code. default // state{ touch_start(integer total_number) // this is an event { // this is the content of the event } // end of event } // end of state
13. FUNCTIONS 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's. ex. llSay() Functions take "arguments" 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. llSay(0, "Touched.");
15. After saving your script occurs following: The instant you save your script, it enters default state, which in turns runs the "state_entry" event which in turn runs the function llSay() which makes the object talk. After this the program waits idle in the default state until a new event is called. Touching the box triggers the even "touch_start" which also makes the object speak.
16. Introducing States and Events 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. Lets look at a script with two states with two events in each.
17.
18. A simplification of this would be default {//set color to light and, if touched, enter the "off" state. } state off {//set color to dark and, if touched, enter the "default" state. } Note that after "default" all new states begin with the word "state".
19. A closer look llSay(0, "turning on!"); Channel zero is the channel you see all public chat on. A semicolon ends the line. llSetColor(<0,0,0>, ALL_SIDES); This turns the prim to it's brightest tint. You see it as bright white . The three 0's stand for the black and the three 1's stand for the white.
20. Program creates a loop 1. Enters default state 2. Runs code in "state entry" 3. Waits to be touched. 4. When touched enters "state off" 5. Enters "state off". 6. Runs code in "state entry" in the "off" state's body 7. Waits to be touched in the "off" state's body 8. When touched enters "default" state. Where the whole thing starts over.
21. Objects speaking is a great way to know what a script is doing As you get into more complex scripts this can get pretty noisy to the surrounding people! llWhisper( ) is just like llSay( ) but only broadcasts at half the distance. llWhisper(0,"turnign on!"); //might work a bit to save the sanity of your neighbors. Using llShout( ) doubles the distance heard, but can cut the amount of friends you have in SL. llOwnerSay( ) uses no channel and is heard only by you.llOwnerSay("turnign on!");
22. Totally silent message via llSetText( ) You can make a totally silent message via llSetText( ) like this. llSetText("I am on", <1,1,1>,1.0); <1,1,1>, means "white" and <0,0,0> means "black". Replace the llSay(0,"turnign off!"); with... The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible). Read about programming in SL wiki. http://wiki.secondlife.com/wiki/SL_Cert_-_Basic_Scripting