#82 llParticleSystem implemented?

open
nobody
None
5
2009-02-19
2009-02-19
metaphorz
No

Using the Dec. 2nd RealXtend Viewer binary
along with OpenSim + Modrex, the following
script doesn't work, but does work if the LL
viewer is used. This is on a Windows XP system.
Just drop the script into a prim, and touch.

// 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,
PSYS_SRC_TEXTURE, Texture
];
llParticleSystem (Parameters);
integer Particles = (integer) (Age * (float) Count / Rate);
if (4096 < Particles)
{
llOwnerSay ("Emitter creates too many particles!");
}
//llOwnerSay ("Emitter produces " + (string) Particles + " concurrent particles.");
}

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

MyParticle (){
Interpolate_Scale = TRUE;
Start_Scale = <0.04,0.04, 0>;
End_Scale = <0.55,0.55, 0>;
Interpolate_Colour = FALSE;
Start_Colour = < 1, 1, 1>;
End_Colour = < 1, 1, 1 >;
Start_Alpha = 0.035;
End_Alpha =0.0;
Emissive = TRUE;
Age = 0.4;
Rate = 0.01;
Count = 10;
Life = 0;
Pattern = PSYS_SRC_PATTERN_ANGLE_CONE;
Radius = 0;
Begin_Angle = 0;
End_Angle = 0.28;
Omega = < 0, 0, 0 >;
Follow_Source = TRUE;
Follow_Velocity = TRUE;
Wind = FALSE;
Bounce = FALSE;
Minimum_Speed = 1.0;
Maximum_Speed = 2.0;
Acceleration = < 0, 0,0.0 >;
Target = FALSE;
Target_Key = NULL_KEY;

Particle_System ();
}

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

default
{

state_entry ()
{
MyParticle ();
}

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

}

Discussion