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.
- β 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.
- Invisible by Default β The object starts fully transparent.
- Avatar Detection β The script checks for nearby avatars periodically.
- Smooth Transition β When an avatar enters range, the object gradually fades in.
- Automatic Fade-Out β If no avatars are detected, the object fades out smoothly.
- Inverse β Use the inverse script to make it fade away as people approach.
| 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). |
- Copy & paste the contents of
script.lslinto a prim in Second Life. - Link multiple prims if you want a multi-prim object to fade together.
- Adjust the configuration variables to fit your needs.
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! π