Tribble Hair. Generates a particle surround to give an ephemeral appearance to an object (transparent and phantom).  Colors change from time to time.    Particle system
float loclip (float num, float clipat )
{num = num + .5- clipat ;
float Result = num * llRound (num);
return Result;}
User defined function 
num is number (usually random) between 0 and 1; clipat is clip point. Numbers less than clipat are set to zero.
float randFMTO(float FM, float TO)
{ return llFrand(TO- FM) + FM; }
User defined function  
Gets random number in the range FM -- TO.
default {
state_entry()
See: Welcome watcher
Image floater, random
Colorators

{ llSetTimerEvent(2.0); }

 

timer() {

 

float red = randFMTO(.4, 1.);
float green = loclip((llFrand (1)),.7);
float blue= loclip((llFrand (1)),.7) ;
vector Color = <red, green, blue> ;
llSetTimerEvent(300.0);

This mix of two methods for color selection avoids black.  It also produces a bias toward reddish colors.
list ParParams = [
PSYS_PART_FLAGS,( //Mask on:1. Off:0
( 1 * PSYS_PART_EMISSIVE_MASK ) |
( 1 * PSYS_PART_BOUNCE_MASK ) |
( 1 * PSYS_PART_INTERP_COLOR_MASK ) |
( 1 * PSYS_PART_INTERP_SCALE_MASK ) |
( 0 * PSYS_PART_WIND_MASK ) | //No wind effect
( 0 * PSYS_PART_FOLLOW_SRC_MASK ) |
( 1 * PSYS_PART_FOLLOW_VELOCITY_MASK ) |
( 0 * PSYS_PART_TARGET_POS_MASK ) ),

PSYS_PART_START_COLOR, Color,
PSYS_PART_END_COLOR, Color,
PSYS_PART_START_ALPHA, 1.,
PSYS_PART_END_ALPHA, 1.,
PSYS_PART_START_SCALE, < 0.2, 0.2, 0.0 >,
PSYS_PART_END_SCALE, < 0.3, 0.4, 0.0 >,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,
PSYS_SRC_BURST_PART_COUNT, 100, //Number of particles per burst, 1 to 4096
PSYS_SRC_BURST_RATE, 2., //Seconds between particle bursts, 0.0 to 60
PSYS_PART_MAX_AGE, 8., // How many seconds each particle lives, 0.1 to 60
PSYS_SRC_ACCEL, < 0.00, 0.00, 0.0 > ,
PSYS_SRC_MAX_AGE, 600., //Number of seconds this particle call continues
PSYS_SRC_BURST_RADIUS, .1,
PSYS_SRC_BURST_SPEED_MIN, .01,
PSYS_SRC_BURST_SPEED_MAX, .02
];
This is one script line, defining ParParams

llParticleSystem(ParParams);

 
   }
}
close timer block
close Default
The Thinkerer 05/09/2008
Copyright (c) D. F. Dansereau & S. H. Evans

Site Map

Where start?

LODScr
Famous fables