1 / 8

Introduction to LSL: Object-Oriented Scripting in Second Life

Linden Scripting Language (LSL) is a high-level scripting language developed by Linden Labs for Second Life. This powerful and simple language allows users to attach behaviors to objects, control their interactions, and enhance virtual environments. LSL supports event-driven scripting, enabling responses to collisions, chat commands, and timers. Users can create custom scripts using approximately 300 preset functions, enhancing their products for the Second Life community. With similarities to C/C++ and Java, LSL is an essential tool for immersive experience creation within this virtual world.

lerato
Télécharger la présentation

Introduction to LSL: Object-Oriented Scripting in Second Life

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LSL:Linden Scripting Language Andrew Orr 12/17/07

  2. “Object”-Oriented • LSL is a high-level scripting language • Developed by Linden Labs for their virtual world Second Life. • Simple, powerful language used to attach behaviors to the objects

  3. Purpose of LSL • Control the behavior and interaction of objects within Second Life • Allows internet communication through HTML requests and email • Users create scripts to enhance their products that they make available to other SL residents

  4. LSL is very similar in syntax to C/C++ and Java, and is compiled into byte code much like Java • LSL is state-event driven language • Event triggers: collisions with other objects, movement, chat commands from users, email, timers, etc.

  5. Functions There are approximately 300 preset library functions, but users can also define their own functions. • All Linden library functions begin with ll, eg. llSay(0, “Shoulda had take home exam!”);

  6. Script Facts • Each script executes within its own chunk of the simulator’s memory. • Each script is given a slice of time from a set amount of time given to scripts in a simulator. • Multiple scripts can be attached to an object to allow for complex behaviors.

  7. Data Structures • Integers • Floats • Strings • Vectors (used for position, direction, colors) • Rotations (quaternions) • Lists

  8. Example Script default { state_entry() { llSay(0, "Hello, Avatar!"); } touch(integer total_number) //executes when an avatar { //touches the object. llSay(0, "Touched."); } }

More Related