Join us in Phaze Demesnes

LSL Script Library Home   Add a script Show All
Category: Contributor: Description
Particles Ama Omega Blacksmoke like on a fire
Black smoke fades to white in  a ball shape
The script

Download this script - Please use this link to get this script. If you see all the code on one long line, please use Wordpad or another editor, such as LSLEdit.exe. The .LSL file you will download is an ordinary text file.

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