Bugün Second Life tek yerde Hediyeler ve freebie’ler her saat güncellenir 7 dil Ücretsiz mağazanı ekle
12:49 SLT Etkinliğini ekle+ Ekle
Grid sorunu
  • Planlı: Scheduled Billing Maintenance, 16 Kas Pzt 09:30–10:30 SLT
  • Grid durumu: Unscheduled Group Chat Maintenance (investigating)
  • Şimdi: UUtopia'da Unitarian Universalist Cumartesi Ayini
  • Şimdi: The Dharma of Community: Budist Toplum ve Householder
  • Şimdi: SLCS Harvest Fest: oyunlar, müzik ve eğlence
  • 14:00 SLT: Cascadia Moondance'te NAD GOUGH canlı performans, 14:00 SLT
  • Haberler: REZZ MALL: Second Life markaları tek bir web mağazasında
  • Viewer: Second Life Viewer 26.5 ile sohbet yenileniyor
  • Planlı: Scheduled Billing Maintenance, 16 Kas Pzt 09:30–10:30 SLT
  • Grid durumu: Unscheduled Group Chat Maintenance (investigating)
  • Şimdi: UUtopia'da Unitarian Universalist Cumartesi Ayini
  • Şimdi: The Dharma of Community: Budist Toplum ve Householder
  • Şimdi: SLCS Harvest Fest: oyunlar, müzik ve eğlence
  • 14:00 SLT: Cascadia Moondance'te NAD GOUGH canlı performans, 14:00 SLT
  • Haberler: REZZ MALL: Second Life markaları tek bir web mağazasında
  • Viewer: Second Life Viewer 26.5 ile sohbet yenileniyor
LSL script

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 satır ·

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 satır Bu scripti denetle
// 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);
    }
}

Ücretsizdir: kullanabilir, değiştirebilir ve sattıkların dahil kendi yapımlarına koyabilirsin.

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.

Kendi scriptini denetle: LSL sözdizimi denetleyicisi →

Diğer scriptlerTüm scriptler
LSL script · 55 satır

LSL kapı scripti: dokununca açılır, kendi kendine kapanır

Second Life için ücretsiz LSL kapı scripti. Dokununca açılıp kapanır, kapı menteşesi üzerinde döner ve birkaç saniye sonra kendiliğinden kapanır. Sesler isteğe bağlı.

LSL script · 69 satır

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 script · 96 satır

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.