Fire Particle Script

Expired

//  Original Particle Script v3 by Ama Omega
// settings and customizations by Jopsy Pendragon

// Mask Flags - set to TRUE to enable
integer glow =TRUE;            // Make the particles glow
integer bounce = FALSE;          // Make particles bounce on Z plan of object
integer interpColor = TRUE;     // Go from start to end color
integer interpSize = TRUE;      // Go from start to end size
integer wind = FALSE;           // Particles effected by wind
integer followSource = TRUE;    // Particles follow the source
integer followVel = FALSE;       // Particles turn to velocity direction

// Choose a pattern from the following:
// PSYS_SRC_PATTERN_EXPLODE
// PSYS_SRC_PATTERN_DROP
// PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
// PSYS_SRC_PATTERN_ANGLE_CONE
// PSYS_SRC_PATTERN_ANGLE
integer pattern = PSYS_SRC_PATTERN_ANGLE;

// Select a target for particles to go towards
// "" for no target, "owner" will follow object owner 
//    and "self" will target this object
//    or put the key of an object for particles to go to
key target="";

// Particle paramaters
float age =2.6; //how long will particles live (in seconds)
float maxSpeed =.05; //maximum speed a particle should be moving
float minSpeed = .01; //minimum speed a particle should be movie
string texture="e8c34f55-dea6-b09e-ee3a-79303024a502"; //texture applied to the particles
float startAlpha =.9; //alpha transparency at start
float endAlpha =.1; //alpha at end
vector startColor = <0.91961, 0.34706, 0.04706> ; //particles start as this color
vector endColor =  <0.98039, 0.88627, 0.27059>; //and end as thiscolor
vector startSize = <1 ,1,1>; //particles start at this size
vector endSize = <.2,.2,10>; //and end at this size
vector push = <0,0,.3>; //how far to push particles

// System paramaters
float rate = 0.1;      // How fast to emit particles
float radius = 0;       // Radius to emit particles for BURST pattern
integer count =1;   // How many particles to emit per BURST 
float outerAngle = 0.0;   // Outer angle for all ANGLE patterns
float innerAngle = 0.05;   // Inner angle for all ANGLE patterns
vector omega = <0,0,3>; // Rotation of ANGLE patterns around the source
float life = 0;



// Script variables
integer flags;

updateParticles()
{
    if (target == "owner") target = llGetOwner();
    if (target == "self") target = llGetKey();
    if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
    if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
    if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
    if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
    if (wind) flags = flags | PSYS_PART_WIND_MASK;
    if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
    if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
    if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;

    
    //llMakeSmoke( 500, 1, 1, 10, 1, "Alien FaceSucker.tga", <0,0,0>); 
    if (1) { llParticleSystem([  PSYS_PART_MAX_AGE,age,
                        PSYS_PART_FLAGS,flags,
                        PSYS_PART_START_COLOR, startColor,
                        PSYS_PART_END_COLOR, endColor,
                        PSYS_PART_START_SCALE,startSize,
                        PSYS_PART_END_SCALE,endSize, 
                        PSYS_SRC_PATTERN, pattern,
                        PSYS_SRC_BURST_RATE,rate,
                        PSYS_SRC_ACCEL, push,
                        PSYS_SRC_BURST_PART_COUNT,count,
                        PSYS_SRC_BURST_RADIUS,radius,
                        PSYS_SRC_BURST_SPEED_MIN,minSpeed,
                        PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
                        PSYS_SRC_TARGET_KEY,target,
                        PSYS_SRC_INNERANGLE,innerAngle, 
                        PSYS_SRC_OUTERANGLE,outerAngle,
                        PSYS_SRC_OMEGA, omega,
                        PSYS_SRC_MAX_AGE, life,
                        PSYS_SRC_TEXTURE, texture,
                        PSYS_PART_START_ALPHA, startAlpha,
                        PSYS_PART_END_ALPHA, endAlpha
                            ]);
                        }
}
default
{
    state_entry()
    {
        updateParticles();
        llSetTimerEvent(360);
    }
    
    timer() { 
        vector pos = llGetSunDirection();
        if ( pos.z = 0 ) llParticleSystem( [ ] );
        else updateParticles();
    }
    
    
}

 

Snow

Expired

string particle_texture = "";
list snow;
integer switch=TRUE;

default
{
    state_entry()
    {
        snow = [ 
            PSYS_PART_FLAGS, PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_FOLLOW_SRC_MASK | PSYS_PART_EMISSIVE_MASK, 
            PSYS_PART_START_COLOR, <1 .0,1.0,1.0>, 
            PSYS_PART_END_COLOR, <1 .0,1.0,1.0>,
            PSYS_PART_START_ALPHA, 0.7, 
            PSYS_PART_END_ALPHA, 0.5, 
            PSYS_PART_START_SCALE, <0.05,0.05,0.0>,
            PSYS_PART_END_SCALE, <0.1,0.1,0.0>, 
            PSYS_PART_MAX_AGE, 50.0, 
            PSYS_SRC_PATTERN, 
            PSYS_SRC_PATTERN_ANGLE_CONE, 
            PSYS_SRC_INNERANGLE, 0.0, 
            PSYS_SRC_OUTERANGLE, PI,            
            PSYS_SRC_ACCEL,<0,0,-0.05>,
            PSYS_SRC_OMEGA,ZERO_VECTOR, 
            PSYS_SRC_BURST_RATE, 0.1, 
            PSYS_SRC_BURST_PART_COUNT, 100, 
            PSYS_SRC_BURST_RADIUS, PI,
            PSYS_SRC_BURST_SPEED_MIN, 0.25, 
            PSYS_SRC_BURST_SPEED_MAX, 0.5, 
            PSYS_SRC_MAX_AGE, 0.0
            ];
        llListen(0, "", llGetOwner(), "/snow on");
        llListen(0, "", llGetOwner(), "/snow off");

    }

    listen(integer chan, string name, key id, string msg)
    {
        if (msg == "/snow on")
        {
            llSay(0, "Snow on");
            llParticleSystem(snow);
            switch=FALSE;
        }
        if (msg == "/snow off")
        {
            llSay(0, "Snow off");
            llParticleSystem([]);
            switch=TRUE;
        }
    }
}

 

Particle Poofer Script

Expired

Add script and a single texture to a prim. use the following commands to configure the poofer script: Say: set keyword - sets the keyword which activates the poofer (the scripts default keyword is 'poof') example say: set keyword pop would cause the poofer script to trigger whenever you say 'pop' set channel - sets the chat channel the poofer listens on example set channel 12 will instruct the poofer script to listen for the keyword on channel 12 (so to activate it you would type '/12 poof')

 

string    texture;
string    keyword = "poof";


updateParticles()
{
    llParticleSystem([0,256,1,<1 .0,1.0,1.0>,2,1.0,5,<1 ,1,1>,7,8.0,9,2,12,texture,13,0.1,15,12,17,0.5,18,0.5,19,2.0]);
    llSleep(2.5);
    llParticleSystem([]);
}

integer channel = 0;

integer Handle;
default
{
    state_entry() {
        texture = llGetInventoryName(INVENTORY_TEXTURE, 0);
        Handle = llListen (channel, "", llGetOwner(), "");
    }
    changed(integer change)
    {
        if (change & CHANGED_OWNER)
            llResetScript();
    }

    listen(integer chan, string name, key id, string msg) 
    {
        if (msg == keyword) {
            updateParticles();
        } else if (llToLower(llGetSubString(msg, 0, 10)) == "set keyword") 
        {
            keyword = llToLower(llDeleteSubString(msg, 0, 11));
            llOwnerSay("Keyword set to "+keyword);
        } else if (llToLower(llGetSubString(msg, 0, 10)) == "set channel") 
        {
            if ((channel = ((integer)llDeleteSubString(msg, 0, 11))) <0) channel = 0;
            llOwnerSay("Chat Channel set to "+(string)channel);
            llListenRemove(Handle);
            Handle = llListen (channel, "", llGetOwner(), "");
        }
    }
}