11.07.2015 Views

Linden Scripting Language Guide - Engineering Center

Linden Scripting Language Guide - Engineering Center

Linden Scripting Language Guide - Engineering Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 1. IntroductionThe <strong>Linden</strong> <strong>Scripting</strong> <strong>Language</strong> (LSL) is a simple, powerful language used to attach behaviors to the objectsfound in Second Life. It follows the familiar syntax of a c/Java style language, with an implicit state machine forevery script.Multiple scripts may also be attached to the same object, allowing a style of small, single-function scripts toevolve. This leads to scripts that perform specific functions ("hover", "follow", etc.) and allows them to becombined to form new behaviors.The text of the script is compiled into an executable byte code, much like Java. This byte code is then run withina virtual machine on the simulator. Each script receives a time slice of the total simulator time allocated toscripts, so a simulator with many scripts would allow each individual script less time rather than degrading itsown performance. In addition, each script executes within its own chunk of memory, preventing scripts fromwriting into protected simulator memory or into other scripts, making it much harder for scripts to crash thesimulator.This tutorial introduces the reader to the basic features of LSL, how to edit and apply your scripts, and acomplete reference for standard linden constants, events, and library functions.1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!