Home

LSL

LSL, the Linden Scripting Language, is a scripting language used in Second Life to give in-world objects, features, and avatars interactive behavior. Scripts run on the simulator and are attached to prims, objects, or avatars to respond to events and perform actions, enabling everything from simple animations to complex systems.

LSL is designed as an event-driven, procedurally oriented language with a C-like syntax. It is statically typed

Most functionality in LSL is exposed through a large set of built-in functions prefixed with ll, covering

Developers use LSL to create interactive objects, NPC behaviors, and gameplay mechanics, contributing to the broader

and
provides
data
types
such
as
integer,
float,
string,
key,
vector,
rotation,
and
list.
Programs
are
organized
into
states,
with
a
default
state
containing
the
state_entry
event;
objects
can
react
to
events
such
as
touch_start,
collision_start,
on_rez,
timer,
and
listen-related
events.
The
language
supports
common
control
structures
(if/else,
while,
for,
switch)
and
a
rich
standard
library
of
built-in
functions.
object
manipulation
(llSetPos,
llSetRot,
llSetText),
communication
(llSay,
llWhisper,
llListen),
sensing
and
interaction
(llSensor,
llGetMcEvent),
and
external
connectivity
(llHTTPRequest).
LSL
also
supports
data
structures
such
as
lists
and
strings,
enabling
developers
to
create
complex
interactions,
games,
and
automation
within
the
virtual
world.
Scripts
are
subject
to
memory
limits
(historically
around
64
kilobytes
per
script)
and
operate
with
restricted
access
to
the
hosting
environment,
notably
lacking
direct
file
I/O
or
local
system
access.
ecosystem
of
Second
Life
content.
While
closely
tied
to
Second
Life,
LSL
concepts
and
some
compatibility
have
influenced
similar
scripting
environments
in
other
virtual
worlds.