// Generated by 'particles-lsl-generator.bashora.com', Zeja Pyle, 2008.

// DECLARATION ==============================
string Texture;
integer Interpolate_Scale;
vector Start_Scale;
vector End_Scale;
integer Interpolate_Colour;
vector Start_Colour;
vector End_Colour;
float Start_Alpha;
float End_Alpha;
integer Emissive;
float Age;
float Rate;
integer Count;
float Life;
integer Pattern;
float Radius;
float Begin_Angle;
float End_Angle;
vector Omega;
integer Follow_Source;
integer Follow_Velocity;
integer Wind;
integer Bounce;
float Minimum_Speed;
float Maximum_Speed;
vector Acceleration;
integer Target;
key Target_Key;


// BASIC FUNCTION ==============================

Particle_System ()
{
list Parameters = 
[
PSYS_PART_FLAGS,
(
(Emissive * PSYS_PART_EMISSIVE_MASK) |
(Bounce * PSYS_PART_BOUNCE_MASK) |
(Interpolate_Colour * PSYS_PART_INTERP_COLOR_MASK) |
(Interpolate_Scale * PSYS_PART_INTERP_SCALE_MASK) |
(Wind * PSYS_PART_WIND_MASK) |
(Follow_Source * PSYS_PART_FOLLOW_SRC_MASK) |
(Follow_Velocity * PSYS_PART_FOLLOW_VELOCITY_MASK) |
(Target * PSYS_PART_TARGET_POS_MASK)
),
PSYS_PART_START_COLOR, Start_Colour,
PSYS_PART_END_COLOR, End_Colour,
PSYS_PART_START_ALPHA, Start_Alpha,
PSYS_PART_END_ALPHA, End_Alpha,
PSYS_PART_START_SCALE, Start_Scale,
PSYS_PART_END_SCALE, End_Scale,
PSYS_SRC_PATTERN, Pattern,
PSYS_SRC_BURST_PART_COUNT, Count,
PSYS_SRC_BURST_RATE, Rate,
PSYS_PART_MAX_AGE, Age,
PSYS_SRC_ACCEL, Acceleration,
PSYS_SRC_BURST_RADIUS, Radius,
PSYS_SRC_BURST_SPEED_MIN, Minimum_Speed,
PSYS_SRC_BURST_SPEED_MAX, Maximum_Speed,
PSYS_SRC_TARGET_KEY, Target_Key,
PSYS_SRC_ANGLE_BEGIN, Begin_Angle,
PSYS_SRC_ANGLE_END, End_Angle,
PSYS_SRC_OMEGA, Omega,
PSYS_SRC_MAX_AGE, Life
];
llParticleSystem (Parameters);
}

// YOUR PARTICLES FUNCTION ==============================

MyParticle (){

Interpolate_Scale = TRUE;
Start_Scale = <0.04,0.04, 0>;
End_Scale = <0.1,0.1, 0>;

Interpolate_Colour = TRUE;
Start_Colour = < .6, .6, .6 >;
End_Colour = < .4, .4, .4 >;
Start_Alpha = 0.3;
End_Alpha =0;

Emissive = TRUE;

Age = 3.0;
Rate = 0.1;
Count = 3;
Life = 0;

Pattern = PSYS_SRC_PATTERN_ANGLE_CONE;
Radius = 0.0;
Begin_Angle = PI/4;
End_Angle = PI/4;
Omega = < 0, 0, 0 >;

Follow_Source = FALSE;
Follow_Velocity = FALSE;
Wind = FALSE;
Bounce = FALSE;

Minimum_Speed = 0.03;
Maximum_Speed = 0.03;
Acceleration = < 0, 0.0, 0.03 >;
Target = FALSE;
Target_Key = NULL_KEY;

Particle_System ();
}

// SCRIPT BODY ==============================

default
{

state_entry ()
{
MyParticle ();
}

touch_start (integer i){
llParticleSystem ([]); // Stop the particles
}

}
