Second Life heute an einem Ort Geschenke & Freebies stündlich aktualisiert 7 Sprachen Kostenlos deinen Store eintragen
12:49 SLT Event eintragen+ Eintragen
Grid-Störung
  • Geplant: Scheduled Billing Maintenance, Mo., 16. Nov. 09:30–10:30 SLT
  • Grid-Status: Unscheduled Group Chat Maintenance (investigating)
  • Jetzt: Unitarian Universalist Samstagsgottesdienst in UUtopia
  • Jetzt: The Dharma of Community: Buddhistische Gesellschaft und der Householder
  • Jetzt: SLCS Harvest Fest: Spiele, Musik und Spaß
  • 14:00 SLT: NAD GOUGH live im Moondance in Cascadia, 14:00 Uhr SLT
  • News: REZZ MALL: Second-Life-Marken in einem Web-Mall
  • Viewer: Second Life Viewer 26.5 mit modernisiertem Chat
  • Geplant: Scheduled Billing Maintenance, Mo., 16. Nov. 09:30–10:30 SLT
  • Grid-Status: Unscheduled Group Chat Maintenance (investigating)
  • Jetzt: Unitarian Universalist Samstagsgottesdienst in UUtopia
  • Jetzt: The Dharma of Community: Buddhistische Gesellschaft und der Householder
  • Jetzt: SLCS Harvest Fest: Spiele, Musik und Spaß
  • 14:00 SLT: NAD GOUGH live im Moondance in Cascadia, 14:00 Uhr SLT
  • News: REZZ MALL: Second-Life-Marken in einem Web-Mall
  • Viewer: Second Life Viewer 26.5 mit modernisiertem Chat
LSL-Skript

LSL particle script: soft sparkles around an object

Free LSL particle script for Second Life: soft gold and pink sparkles for gifts, signs and magic items, with colour, size and amount settings and touch on/off.

58 Zeilen ·

A few sparkles make a gift box, a sign or a magic wand stand out. This particle script sends out soft, glowing sparkles that fade as they drift. All the important values are at the top, so you can make your own effect without learning the whole particle system.

lsl-particle-script.lsl · 58 Zeilen Dieses Skript prüfen
// Sparkle Particles - free LSL script from WhatSL (https://whatsl.com/scripts/lsl-particle-script)
// Free to use, change and put in your own creations, also ones you sell.
//
// Soft sparkles around the object: good for gifts, magic items, signs and decorations.
// Touch to turn them on and off. Change the colours and sizes below to make your own effect.

vector  COLOR_START      = <1.0, 0.9, 0.5>;   // gold
vector  COLOR_END        = <1.0, 0.6, 0.9>;   // pink
float   SIZE_START       = 0.10;  // metres
float   SIZE_END         = 0.04;
float   PARTICLE_LIFE    = 2.0;   // seconds each sparkle lives
float   BURST_RATE       = 0.1;   // seconds between bursts
integer BURST_COUNT      = 3;     // sparkles per burst
string  PARTICLE_TEXTURE = "";    // "" = the standard round particle; or a texture UUID
integer START_ON         = TRUE;

integer gOn = FALSE;

sparkle(integer on)
{
    gOn = on;
    if (!on)
    {
        llParticleSystem([]);
        return;
    }
    list rules = [
        PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK,
        PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,
        PSYS_PART_START_COLOR, COLOR_START,
        PSYS_PART_END_COLOR, COLOR_END,
        PSYS_PART_START_ALPHA, 1.0,
        PSYS_PART_END_ALPHA, 0.0,
        PSYS_PART_START_SCALE, <SIZE_START, SIZE_START, 0.0>,
        PSYS_PART_END_SCALE, <SIZE_END, SIZE_END, 0.0>,
        PSYS_PART_MAX_AGE, PARTICLE_LIFE,
        PSYS_SRC_BURST_RATE, BURST_RATE,
        PSYS_SRC_BURST_PART_COUNT, BURST_COUNT,
        PSYS_SRC_BURST_SPEED_MIN, 0.05,
        PSYS_SRC_BURST_SPEED_MAX, 0.3,
        PSYS_SRC_ACCEL, <0.0, 0.0, -0.05>
    ];
    if (PARTICLE_TEXTURE != "") rules += [PSYS_SRC_TEXTURE, PARTICLE_TEXTURE];
    llParticleSystem(rules);
}

default
{
    state_entry()
    {
        sparkle(START_ON);
    }

    touch_start(integer total)
    {
        sparkle(!gOn);
    }
}

Frei nutzbar, änderbar und in eigenen Kreationen verwendbar, auch in solchen, die du verkaufst.

How to set it up

  1. Put the script in the object and save. Sparkles appear right away.
  2. Touch the object to turn them off and on.
  3. Change the colours, sizes and amounts and save again to see the result.

Settings

  • COLOR_START and COLOR_END: each sparkle fades from the first colour to the second.
  • SIZE_START and SIZE_END: the size of a sparkle when it appears and when it disappears, in metres.
  • PARTICLE_LIFE: how many seconds each sparkle lives.
  • BURST_RATE and BURST_COUNT: how often sparkles appear and how many at a time.
  • PARTICLE_TEXTURE: empty for the standard round particle, or the UUID of your own particle texture.

Tips

  • Less is more: a few slow sparkles look classier than a cloud of fast ones, and they are easier on the viewer.
  • Particles are a setting of the prim. If you delete the script, they keep going. To stop them for good, touch to turn them off first, then delete the script.

Frequently asked questions

Why can't I see any particles?

Your viewer may have particles turned down. Check the maximum particle count in the graphics settings.

How do I make snow or rain instead?

Use a white or blue colour, a longer PARTICLE_LIFE and a stronger downward pull: change PSYS_SRC_ACCEL to something like <0.0, 0.0, -0.5> and place the emitter high up.

Do particles cause lag?

Particles are drawn by each viewer, so they do not slow the region, but very many particles can slow down visitors' viewers. Keep BURST_COUNT small.

Eigenes Skript prüfen: LSL-Syntaxprüfer →

Weitere SkripteAlle Skripte
LSL-Skript · 55 Zeilen

LSL-Tür-Skript: Berühren zum Öffnen, schließt sich selbst

Kostenloses LSL-Türskript für Second Life. Berühren zum Öffnen und Schließen, die Tür schwingt um ihr Scharnier und schließt sich nach einigen Sekunden selbst. Geräusche optional.

LSL-Skript · 69 Zeilen

LSL sit and pose script for chairs and pose balls

Free LSL sit script for Second Life chairs, benches and pose balls: sit and play your own animation, set the sit position, hide the ball while in use.

LSL-Skript · 96 Zeilen

LSL tip jar script with thank-you message and total

Free LSL tip jar script for Second Life clubs, DJs, hosts and stores: quick pay buttons, a thank-you message, the total and last tipper in floating text.