01 – Introduction

The Linden Scripting Language (LSL) is a simple, powerful language used to attach behaviors to the objects
found in Second Life. It follows the familiar syntax of a c/Java style language, with an implicit state machine for
every script.

Multiple scripts may also be attached to the same object, allowing a style of small, single-function scripts to
evolve. This leads to scripts that perform specific functions (“hover”, “follow”, etc.) and allows them to be
combined 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 within
a virtual machine on the simulator. Each script receives a time slice of the total simulator time allocated to
scripts, so a simulator with many scripts would allow each individual script less time rather than degrading its
own performance. In addition, each script executes within its own chunk of memory, preventing scripts from
writing into protected simulator memory or into other scripts, making it much harder for scripts to crash the
simulator.

This tutorial introduces the reader to the basic features of LSL, how to edit and apply your scripts, and a
complete reference for standard linden constants, events, and library functions.

Esta entrada fue publicada en SL Scripting guide. Guarda el enlace permanente.

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *

*

Puedes usar las siguientes etiquetas y atributos HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>