//Particle Light String System 1.0
//Written By Ruthven Willenov
//
//Instructions: Simply Drop this script into a prim, copy the prim however you prefer. Position them appropriately. Then select them backwords in the order you wish the lights to run and link them. The scripts will reset them selves if the number of links change. And that's it! Just sit back and enjoy the lights
integer target;
lightstring()
{
integer self = llGetLinkNumber();
integer totalnum = llGetNumberOfPrims();
if (self <= totalnum)
target = self+1;
if (self == totalnum)
target = LINK_ROOT;
{
llParticleSystem([
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP,
PSYS_PART_FLAGS,
PSYS_PART_INTERP_COLOR_MASK|//used if you want the colors to change between source and target
PSYS_PART_TARGET_POS_MASK|//Makes the particles more towards the set target, targets itself it no target is set
PSYS_PART_EMISSIVE_MASK|//Makes the particles glow
PSYS_PART_FOLLOW_SRC_MASK|//particles move with the source
PSYS_PART_INTERP_SCALE_MASK,//used if you want the particles to change size between source and target
PSYS_PART_START_SCALE,llGetScale(),//gets the size of the prim the script is is, change if you want to use a different size. IE: PSYS_PART_START_SCALE, <0.1,0.1,0.25>,
PSYS_PART_END_SCALE,llGetScale(),//same as above, must use scale mask in flags above
PSYS_SRC_BURST_RATE,0.01,//how often to emit each burst, in seconds
PSYS_SRC_ACCEL, <0,0,-0.1>,//which direction the particles should move before moving towards target, <0,0,-0.1> makes them move down slightly
PSYS_SRC_BURST_PART_COUNT,2,//how many particles to emit in each burst
PSYS_SRC_TARGET_KEY, (key)llGetLinkKey(target),//get the key of the target link
PSYS_SRC_MAX_AGE, 0.0,//how long to emit particles, in seconds. 0 means forever
PSYS_PART_START_ALPHA, 0.75,//how opaque the particles are when first emitted
PSYS_PART_END_ALPHA, 1.0,//how opaque particles are at the end (must use color mask in flags above)
PSYS_SRC_TEXTURE, "",//uuid for the texture you want the particle to display (or name of texture if it's in the object's inventory)
PSYS_PART_START_COLOR, <1,1,1>,//what color to start the particle with
PSYS_PART_END_COLOR, <1,1,1>//what color to end the particle with(must use color mask in flags above)
]);
}
}
default
{
state_entry()
{
lightstring();
}
changed(integer change)
{
if (change & CHANGED_LINK)//if the number of links changed
llResetScript();//reset this script
}
}