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 Blacksmoke_like_on_a_fire  

Blacksmoke_like_on_a_fire

The script

Category: Particles
By : Ama Omega
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Blacksmoke_like_on_a_fire
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Blacksmoke_like_on_a_fire_1.lsl
1
2 // Particle Script 0.3
3 // Created by Ama Omega
4 // 10-10-2003
5
6 // Mask Flags - set to TRUE to enable
7 integer glow = TRUE; // Make the particles glow
8 integer bounce = FALSE; // Make particles bounce on Z plan of object
9 integer interpColor = TRUE; // Go from start to end color
10 integer interpSize = TRUE; // Go from start to end size
11 integer wind = TRUE; // Particles effected by wind
12 integer followSource = TRUE; // Particles follow the source
13 integer followVel = TRUE; // Particles turn to velocity direction
14
15 // Choose a pattern from the following:
16 // PSYS_SRC_PATTERN_EXPLODE
17 // PSYS_SRC_PATTERN_DROP
18 // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
19 // PSYS_SRC_PATTERN_ANGLE_CONE
20 // PSYS_SRC_PATTERN_ANGLE
21 integer pattern = PSYS_SRC_PATTERN_EXPLODE;
22
23 // Select a target for particles to go towards
24 // "" for no target, "owner" will follow object owner
25 // and "self" will target this object
26 // or put the key of an object for particles to go to
27 key target = "";
28
29 // Particle paramaters
30 float age = 3; // Life of each particle
31 float maxSpeed = 1; // Max speed each particle is spit out at
32 float minSpeed = 1; // Min speed each particle is spit out at
33 string texture; // Texture used for particles, default used if blank
34 float startAlpha = 0.07; // Start alpha (transparency) value
35 float endAlpha = 0.07; // End alpha (transparency) value
36 vector startColor = <0,0,0>; // Start color of particles <R,G,B>
37 vector endColor = <1,1,1>; // End color of particles <R,G,B> (if interpColor == TRUE)
38 vector startSize = <1,1,1>; // Start size of particles
39 vector endSize = <1,1,1>; // End size of particles (if interpSize == TRUE)
40 vector push = <0,0,0>; // Force pushed on particles
41
42 // System paramaters
43 float rate = 0.001; // How fast (rate) to emit particles
44 float radius = 0; // Radius to emit particles for BURST pattern
45 integer count = 100; // How many particles to emit per BURST
46 float outerAngle = 0; // Outer angle for all ANGLE patterns
47 float innerAngle = 0; // Inner angle for all ANGLE patterns
48 vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source
49 float life = 0; // Life in seconds for the system to make particles
50
51 // Script variables
52 integer flags;
53
54 updateParticles()
55 {
56 flags = 0;
57 if(target == "owner") target = llGetOwner();
58 if(target == "self") target = llGetKey();
59 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
60 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
61 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
62 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
63 if(wind) flags = flags | PSYS_PART_WIND_MASK;
64 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
65 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
66 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
67
69 PSYS_PART_FLAGS,flags,
70 PSYS_PART_START_COLOR, startColor,
71 PSYS_PART_END_COLOR, endColor,
72 PSYS_PART_START_SCALE,startSize,
73 PSYS_PART_END_SCALE,endSize,
74 PSYS_SRC_PATTERN, pattern,
76 PSYS_SRC_ACCEL, push,
82 PSYS_SRC_INNERANGLE,innerAngle,
83 PSYS_SRC_OUTERANGLE,outerAngle,
84 PSYS_SRC_OMEGA, omega,
85 PSYS_SRC_MAX_AGE, life,
86 PSYS_SRC_TEXTURE, texture,
87 PSYS_PART_START_ALPHA, startAlpha,
88 PSYS_PART_END_ALPHA, endAlpha
89 ]);
90 }
91
92 default
93 {
95 {
96 updateParticles();
97 }
98 }// END //

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