Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Particles effect_Red_Rapture  

effect_Red_Rapture

effect Red Rapture.lsl

Category: Particles
By : boogday kuu
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for effect_Red_Rapture
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. effect_Red_Rapture_1.lsl
1
2 //////////////////////////////////////////////////////////////////
3 //////////////////////////////////////////////////////////////////
4 //// eltee Statosky's Particle Creation Engine 1.0
5 //// 01/09/2004 modified by boogadey kuu
6 //// *PUBLIC DOMAIN*
7 //// Free to use
8 //// Free to copy
9 //// Free to poke at
10 //// Free to hide in stuff you sell
11 //// Just please leave this header intact
12 //////////////////////////////////////////////////////////////////
13 //////////////////////////////////////////////////////////////////
14
15 integer effectFlags=0;
16 integer running=TRUE;
17
18
19
20
21 ///////////////////////////////////////////////////////
22 // Color Secelection Variables
23 ///////////////////////////////////////////////////////
24 // Interpolate between startColor and endColor
25 integer colorInterpolation = TRUE;
26 // Starting color for each particle
27 vector startColor = <1.0, 1.1, 7>;
28 // Ending color for each particle
29 vector endColor = <1, 1, 1>;
30 // Starting Transparency for each particle (1.0 is solid)
31 float startAlpha = 9;
32 // Ending Transparency for each particle (0.0 is invisible)
33 float endAlpha = 0;
34 // Enables Absolute color (true) ambient lighting (false)
35 integer glowEffect = TRUE;
36
37
38 ///////////////////////////////////////////////////////
39 // Size & Shape Selection Variables
40 ///////////////////////////////////////////////////////
41 // Interpolate between startSize and endSize
42 integer sizeInterpolation = TRUE;
43 // Starting size of each particle
44 vector startSize = <0.2, 2.2, 3.2>;
45 // Ending size of each particle
46 vector endSize = <1.7, 2.33, 7.77>;
47 // Turns particles to face their movement direction
48 integer followVelocity = TRUE;
49 // Texture the particles will use ("" for default)
50 string texture = "188f0229-26a8-2c90-8e6c-6d70e59b6f0b";
51
52
53 ///////////////////////////////////////////////////////
54 // Timing & Creation Variables Variables
55 ///////////////////////////////////////////////////////
56 // Lifetime of one particle (seconds)
57 float particleLife = 5.99;
58 // Lifetime of the system 0.0 for no time out (seconds)
59 float SystemLife = 0.0;
60 // Number of seconds between particle emissions
61 float emissionRate = 0.02;
62 // Number of particles to releast on each emission
63 integer partPerEmission = 1;
64
65
66 ///////////////////////////////////////////////////////
67 // Angular Variables
68 ///////////////////////////////////////////////////////
69 // The radius used to spawn angular particle patterns
70 float radius = 0.9;
71 // Inside angle for angular particle patterns
72 float innerAngle = 1;
73 // Outside angle for angular particle patterns
74 float outerAngle = 0;
75 // Rotational potential of the inner/outer angle
76 vector omega = <0.0, 0.0, 0.7>;
77
78
79 ///////////////////////////////////////////////////////
80 // Movement & Speed Variables
81 ///////////////////////////////////////////////////////
82 // The minimum speed a particle will be moving on creation
83 float minSpeed = 0.0;
84 // The maximum speed a particle will be moving on creation
85 float maxSpeed = 0.1;
86 // Global acceleration applied to all particles
87 vector acceleration = <0.0, 0.0, 0.2>;
88 // If true, particles will be blown by the current wind
89 integer windEffect = FALSE;
90 // if true, particles 'bounce' off of the object's Z height
91 integer bounceEffect = FALSE;
92 // If true, particles spawn at the container object center
93 integer followSource = FALSE;
94 // If true, particles will move to expire at the target
95 //integer followTarget = TRUE;
96 // Desired target for the particles (any valid object/av key)
97 // target Needs to be set at runtime
98 key target = "";
99
100
101 ///////////////////////////////////////////////////////
102 //As yet unimplemented particle system flags
103 ///////////////////////////////////////////////////////
104 integer randomAcceleration = FALSE;
105 integer randomVelocity = FALSE;
106 integer particleTrails = FALSE;
107
108 ///////////////////////////////////////////////////////
109 // Pattern Selection
110 ///////////////////////////////////////////////////////
111 // Uncomment the pattern call you would like to use
112 // Drop parcles at the container objects' center
113 //integer pattern = PSYS_SRC_PATTERN_DROP;
114 // Burst pattern originating at objects' center
115 //integer pattern = PSYS_SRC_PATTERN_EXPLODE;
116 // Uses 2D angle between innerAngle and outerAngle
117 integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE;
118 // Uses 3D cone spread between innerAngle and outerAngle
119 //integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE;
120 //
121 //integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY;
122
123
124
125 setParticles()
126 {
127 // Here is where to set the current target
128 // llGetKey() targets this script's container object
129 // llGetOwner() targets the owner of this script
130 // Feel free to insert any other valid key
131 target="";
132 // The following block of if statements is used to construct the mask
133 if(colorInterpolation) effectFlags = effectFlags|PSYS_PART_INTERP_COLOR_MASK;
134 if(sizeInterpolation) effectFlags = effectFlags|PSYS_PART_INTERP_SCALE_MASK;
135 if(windEffect) effectFlags = effectFlags|PSYS_PART_WIND_MASK;
136 if(bounceEffect) effectFlags = effectFlags|PSYS_PART_BOUNCE_MASK;
137 if(followSource) effectFlags = effectFlags|PSYS_PART_FOLLOW_SRC_MASK;
138 if(followVelocity) effectFlags = effectFlags|PSYS_PART_FOLLOW_VELOCITY_MASK;
139 if(target!="") effectFlags = effectFlags|PSYS_PART_TARGET_POS_MASK;
140 if(glowEffect) effectFlags = effectFlags|PSYS_PART_EMISSIVE_MASK;
141 //Uncomment the following selections once they've been implemented
142 // if(randomAcceleration) effectFlags = effectFlags|PSYS_PART_RANDOM_ACCEL_MASK;
143 // if(randomVelocity) effectFlags = effectFlags|PSYS_PART_RANDOM_VEL_MASK;
144 // if(particleTrails) effectFlags = effectFlags|PSYS_PART_TRAIL_MASK;
146 PSYS_PART_FLAGS, effectFlags,
147 PSYS_SRC_PATTERN, pattern,
148 PSYS_PART_START_COLOR, startColor,
149 PSYS_PART_END_COLOR, endColor,
150 PSYS_PART_START_ALPHA, startAlpha,
151 PSYS_PART_END_ALPHA, endAlpha,
152 PSYS_PART_START_SCALE, startSize,
153 PSYS_PART_END_SCALE, endSize,
154 PSYS_PART_MAX_AGE, particleLife,
155 PSYS_SRC_ACCEL, acceleration,
156 PSYS_SRC_TEXTURE, texture,
157 PSYS_SRC_BURST_RATE, emissionRate,
158 PSYS_SRC_INNERANGLE, innerAngle,
159 PSYS_SRC_OUTERANGLE, outerAngle,
160 PSYS_SRC_BURST_PART_COUNT, partPerEmission,
163 PSYS_SRC_BURST_SPEED_MAX, maxSpeed,
164 PSYS_SRC_MAX_AGE, SystemLife,
165 PSYS_SRC_TARGET_KEY, target,
166 PSYS_SRC_OMEGA, omega ]);
167 }
168 default
169 {
171 {
172 running=TRUE;
173 llSetText("", <0.0, 0.0, 0.0>, 0.9);
174 setParticles();
175 }
176
177 touch_start(integer num_detected)
178 {
179 if(running==TRUE)
180 {
181 running=FALSE;
182 llSetText("*", <0.0, 0.0, 0.0>, 0.9);
184 }
185 else
186 {
187 running=TRUE;
188 llSetText("", <0.0, 0.0, 0.0>, 0.9);
189 setParticles();
190 }
191 }
192 }
193
194
195 // END //

Back to the Best Free Tools in Second Life and OpenSim.