You can build a bathroom with a shower and the water effect will be produced by the particles of this script.
Vous pouvez construire une salle de bain avec une douche et l'effet de l'eau sera produit par les particules de ce script.

 

 

//********************************************************

 

// particule douche
// Created by Ama Omega

 

// 10-10-2003

 

 

 

integer glow = TRUE;
integer bounce = FALSE;
integer interpColor = TRUE;
integer interpSize = TRUE;
integer wind = FALSE;
integer followSource = FALSE;
integer followVel = TRUE;
integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE;

 

key target = "";

 

 

 


float age = 2.0;
float maxSpeed = 2.0;
float minSpeed = 1.0;
string texture;
float startAlpha = 1.0;
float endAlpha = 1.0;
vector startColor = <1.0, 1.0, 1.0>;
vector endColor = <1.0, 1.0, 1.0>;
vector startSize = <0.02, 0.1, 0.02>;
vector endSize = <0.04, 0.1, 0.04>;
vector push = <0.0, 0.0, 0.0>;

 

float rate = 0.2;
float radius = 0.01;
integer count = 50;
float outerAngle = 3.0;
float innerAngle = 0.9;
float beginAngle = 0.2;
float endAngle = 0.0;

 

vector omega = <0.0, 0.0, 0.0>;
float life = 0.0;

 

integer flags;

 


updateParticles()
{

 

flags = 0;

 

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;

 


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_ANGLE_BEGIN,beginAngle,

 

PSYS_SRC_ANGLE_END,endAngle,

 

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();

 

}

 

}