Introduction to Linden Scripting Language for Second Life
![]() |
|
Description
The Linden Scripting Language allows residents of the Second Life World to program the three dimensional objects around them. Without this programming objects built in Second Life are motionless and non-interactive. Adding a script enables an object to interact with the world around it. Second Life scripts allow objects such as cars, planes, amusement park rides, weapons and other entertainment devices to be created.
This book teaches the beginning Second Life programmer to make use of the basics of the Linden Scripting Language. Language fundamentals, such as variables, loops, lists, events, functions and state machines are covered. The book then moves to more advanced topics such as user interaction and non-physical movement. Later chapters show how to use the Second Life physics engine to create vehicles.
Contents
To script in Second Life, one must know the basics of building. Chapter 1 begins with a basic introduction to building. You are shown how to create prims and link them to form objects. Rotation, position, and other more advanced attributes of prims are covered.
Chapter 2 begins with an introduction to the Linden Scripting Language. You are shown how to create scripts and perform basic operations. This chapter introduces variables and shows the structure of a script.
Chapter 3 focuses on script control. You will see how to cause your scripts to make decisions based on variables. You will also see how to use the three different loop types that Second Life makes available.
Second Life makes extensive use of state machines. Chapter 4 is exclusively dedicated to state machines. You will see how to make use of state machines in a script. You will see how to initialize a state and switch between states.
Strings hold textual information. Chapter 5 shows how to manipulate strings. You will see how to compare strings, beyond the simple case sensitive comparisons provided by the Linden Scripting Language. You will also see how to parse strings.
Object can communicate in nearly all of the ways that avatars communicate. Chapter 6 shows how to send instant messages, as well as communicate publicly with all avatars around. Additionally, Second Life menus are covered.
Events are special functions that are called when something happens. Though events were mentioned in pervious chapters, Chapter 7 looks at evens in greater detail. You will also see how to use scanner and money events.
The Linden Scripting Language does not support arrays. Chapter 8 covers lists, which is what the Linden Scripting uses to hold collection of items.
Chapters 9 and 10 cover physical and non-physical movement. Non-physical movement works by changing the x, y and z-coordinates of an object. Physical movement applies a force to the object and uses the laws of physics to move that object.
Chapter 11 shows how to modify prims. Prims can be modified by the script. Any attribute that can be set visually, while building, can also be set by a script. This allows objects to change attributes, such as their image textures, dynamically.
Chapter 12 covers particles. Particles are 2D objects that are often used to cause objects to shine, burn or produce smoke. A variety of effects can be achieved using particles.
Academic and Media Review Copies
If you are considering this book for a class you are teaching, you can [Request a Review Copy]




