Skip to content

LSL Script for fading visibility of objects depending on a user being in range

Hailey-Ross/hails.smoothfadeOnRange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

hails.smoothfadeOnRange

A smooth fade-in/out script for Second Life

This LSL script smoothly fades a linked object in and out when an avatar enters or leaves a specified range.


πŸ“œ Features

  • βœ… Smooth Fade In/Out – No sudden pop-ins or pop-outs.
  • βœ… Works with Linked Prims – Entire linked objects fade together.
  • βœ… Performance Optimized – Avatar detection runs at set intervals to minimize lag.

βš™οΈ How It Works

  1. Invisible by Default – The object starts fully transparent.
  2. Avatar Detection – The script checks for nearby avatars periodically.
  3. Smooth Transition – When an avatar enters range, the object gradually fades in.
  4. Automatic Fade-Out – If no avatars are detected, the object fades out smoothly.
  5. Inverse – Use the inverse script to make it fade away as people approach.

πŸ”§ Configuration Options

Variable Default Description
RANGE 10 meters Distance at which avatars trigger the fade-in effect.
FADE_STEP 0.05 Speed of fading (lower = smoother, higher = faster).
TIMER_INTERVAL 0.1 sec Frequency of fade updates.
CHECK_INTERVAL 2.0 sec How often avatar detection runs (higher reduces lag).

πŸ“œ Installation & Usage

  1. Copy & paste the contents of script.lsl into a prim in Second Life.
  2. Link multiple prims if you want a multi-prim object to fade together.
  3. Adjust the configuration variables to fit your needs.

πŸ“œ License

This script is released under the MIT License.
Feel free to use, modify, and share it!

πŸš€ Enhance your Second Life objects with smooth fading effects! πŸš€

About

LSL Script for fading visibility of objects depending on a user being in range

Resources

Stars

Watchers

Forks

Languages