Collection: LSL scripts

The Internet contains countless LSL scripts that you take and adapt for their own use, and from which one can learn a lot.
LSL scripts:

  • Content Browser
    ATM-like content browsing terminal (example of modular system)
  • Create a flying pet
    A working example on how to create a small flying object using physics-based movement
  • Deluxe Door
    A door with some extras. See also: the new Timeless Linked Door
  • Dialog Module
    Create and handle dialog boxes through linked messages
  • Event Lottery
    Randomly choose a winner from a list of people without duplicates.
  • Fade Texture
    Smoothly drop texture alpha using exponential fall-off.
  • Fast Find
    Fast find number of lines in a notecard (binary search).
  • Fix Repeats Per Meter
    Make a building by roughly positioning walls, then drop this script on each prim. It rescales to grid, positions to grid, and fixes repeats per meter, then deletes self.
  • Go Game
    A fully working Go game board
  • LibrarySerialize
    Implements ‘float-safe’, reasonably quick serialization and unserialization of list types
  • Millisecond Time
    Timezone-aware and millisecond-granuality time and formatting functions
  • NewbieNag
    Give a notecard to a new resident below a certain age
  • Particle Script 1.1
    A very efficient script for the creation and inclusion of particle systems. Albeit not the best if you are just learning, but excellent if a particle system is needed for something else.
  • PortRing Creator
    A system to automatically create a teleporter system from a central “base” location to a number of outlying “stations”
  • Pseudo-Random Number Generator
    For use with secure communication through insecure mediums to reducing the risk of the communications protocol being hacked
  • Radar
    Fairly complete scanner that includes details on distance, time in vicinity and direction
  • Regular timer
    A timer that is synchronized to the wall clock. That is, if you set it to tick every 3 seconds, it ticks at 3, 6, 9, … with accuracy of about 2 parts in 100. It performs some user defined action every 3 seconds, and adjusts itself if it drifts away from the wall clock. Several copies will all perform the action at the same time.
  • Runtime Environment
    Detailed detection of object environment changes like dropping or wearing. Also detects logins!
  • Set Text Once
    Drop it on an object, say “/3 This is Red”, the floating text changes and the script deletes itself.
  • Settings Notecard
    Loads values from a notecard so scripts can be customized by user.
  • SLPrint
    A function to print formated data, including hexidecimal and fixed-point floats
  • Swarm
    This implements the widely-available swarm algorithm in SL.
  • TextureSwitcher
    Texture switcher that will step through the textures in an object’s inventory, displaying them on all sides of the object.
  • TimeElapsed
    When called twice, will give the time elapsed with millisecond precision
  • Unescape
    Unescape escape codes in strings
  • WarpPos
    A function that allows one to do instantaneous non-physical movement
  • XyText
    Display text (up to 6 characters) on a prim

 

For more articles, visit our Home Page