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 ButterflyGenerator  

ButterflyGenerator

Rezzes particle butterflies

Category: Particles
By : JPvdGiessen
Created: 2014-10-21 Edited: 2014-10-21
Worlds: Second Life

the Zip file

Download all files for ButterflyGenerator
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. [521944 bytes] Butterflies.jpg
Get file # 2. [292671 bytes] butterfly002.png
Get file # 3. ButterflyGenerator.lsl
1 // ButterflyGenerator
2 // (c) JPvdGiessen IT Consultancy
3
4 MakeParticles() //This is the function that actually starts the particle system.
5 {
7 PSYS_PART_FLAGS , 0 //Comment out any of the following masks to deactivate them
8 | PSYS_PART_BOUNCE_MASK //Bounce on object's z-axis
9 | PSYS_PART_WIND_MASK //Particles are moved by wind
10 | PSYS_PART_INTERP_SCALE_MASK //Scale fades from beginning to end
11 | PSYS_PART_FOLLOW_SRC_MASK //Particles follow the emitter
12 | PSYS_PART_FOLLOW_VELOCITY_MASK //Particles are created at the velocity of the emitter
13 ,
14
16
17 ,PSYS_SRC_TEXTURE, "butterfly" //UUID of the desired particle texture, or inventory name
18 ,PSYS_SRC_MAX_AGE, 0.0 //Time, in seconds, for particles to be emitted. 0 = forever
19 ,PSYS_PART_MAX_AGE, 50.0 //Lifetime, in seconds, that a particle lasts
20 ,PSYS_SRC_BURST_RATE, 0.5 //How long, in seconds, between each emission
21 ,PSYS_SRC_BURST_PART_COUNT, 3 //Number of particles per emission
22 ,PSYS_SRC_BURST_RADIUS, 1.0 //Radius of emission
23 ,PSYS_SRC_BURST_SPEED_MIN, 1.5 //Minimum speed of an emitted particle
24 ,PSYS_SRC_BURST_SPEED_MAX, 5.0 //Maximum speed of an emitted particle
25 ,PSYS_SRC_ACCEL, <0.0,0.0,-0.8> //Acceleration of particles each second
26 ,PSYS_PART_START_ALPHA, 0.9 //Starting transparency, 1 is opaque, 0 is transparent.
27 ,PSYS_PART_END_ALPHA, 0.0 //Ending transparency
28 ,PSYS_PART_START_SCALE, <0.2,0.2,0.0> //Starting particle size
29 ,PSYS_PART_END_SCALE, <0.01,0.01,0.0> //Ending particle size, if INTERP_SCALE_MASK is on
30 ,PSYS_SRC_ANGLE_BEGIN, PI //Inner angle for ANGLE patterns
31 ,PSYS_SRC_ANGLE_END, PI //Outer angle for ANGLE patterns
32 ,PSYS_SRC_OMEGA, <0.0,0.0,0.0> //Rotation of ANGLE patterns, similar to llTargetOmega()
33 ]);
34 }
35
36 default
37 {
39 {
40 llSay(0, "On") ;
41 MakeParticles(); //Start making particles
42 }
43
44 touch_start( integer num ) //Turn particles off when touched
45 {
46 state off; //Switch to the off state
47 }
48 }
49
50 state off
51 {
53 {
54 llSay(0, "Off") ;
55 llParticleSystem([]); //Stop making particles
56 }
57
58 touch_start( integer num ) //Turn particles back on when touched
59 {
60 state default;
61 }
62 }

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