Join us in Phaze Demesnes

LSL Script Library Home   Add a script Show All
Category: Contributor: Description
Particles anonymous SteamJunk: Manhole/Vent Smoker
Trails of smoke
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 // Particle Script 0.5
2 // Created by Ama Omega
3 // 3-26-2004
4
5 integer keystate = 0 ;
6
7 // Mask Flags - set to TRUE to enable
8 integer glow = FALSE; // Make the particles glow
9 integer bounce = FALSE; // Make particles bounce on Z plane of object
10 integer interpColor = TRUE; // Go from start to end color
11 integer interpSize = TRUE; // Go from start to end size
12 integer wind = TRUE; // Particles effected by wind
13 integer followSource = FALSE; // Particles follow the source
14 integer followVel = FALSE; // Particles turn to velocity direction
15
16 // Choose a pattern from the following:
17 // PSYS_SRC_PATTERN_EXPLODE
18 // PSYS_SRC_PATTERN_DROP
19 // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
20 // PSYS_SRC_PATTERN_ANGLE_CONE
21 // PSYS_SRC_PATTERN_ANGLE
22 integer pattern = PSYS_SRC_PATTERN_EXPLODE;
23
24 // Select a target for particles to go towards
25 // "" for no target, "owner" will follow object owner
26 // and "self" will target this object
27 // or put the key of an object for particles to go to
28 key target = "";
29
30 // Particle paramaters
31 float age = 2.5; // Life of each particle
32 float maxSpeed = 1; // Max speed each particle is spit out at
33 float minSpeed = 0.8; // Min speed each particle is spit out at
34 string texture = "4f714019-c1cf-6b16-994f-44b217022f1a"; // Texture used for particles, default used if blank
35 float startAlpha = 0.8; // Start alpha (transparency) value
36 float endAlpha = 0.0; // End alpha (transparency) value
37 vector startColor = <0.5,0.5,0.5>; // Start color of particles <R,G,B>
38 vector endColor = <0,0,0>; // End color of particles <R,G,B> (if interpColor == TRUE)
39 vector startSize = <0.01,0.01,0.0>; // Start size of particles
40 vector endSize = <2.0,2.0,0.0>; // End size of particles (if interpSize == TRUE)
41 vector push = <.2,0,3>; // Force pushed on particles
42
43 // System paramaters
44 float rate = 0.4; // How fast (rate) to emit particles
45 float radius = 0.0; // Radius to emit particles for BURST pattern
46 integer count = 15; // How many particles to emit per BURST
47 float outerAngle = 0; // Outer angle for all ANGLE patterns
48 float innerAngle = 0.1; // Inner angle for all ANGLE patterns
49 vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source
50 float life = 0; // Life in seconds for the system to make particles
51
52
53 integer flags;
54 list sys;
55 integer type;
56 vector tempVector;
57 rotation tempRot;
58 string tempString;
59 integer i;
60
61
62 updateParticles()
63 {
64 flags = 0;
65 if (target == "owner") target = llGetOwner();
66 if (target == "self") target = llGetKey();
67 if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
68 if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
69 if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
70 if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
71 if (wind) flags = flags | PSYS_PART_WIND_MASK;
72 if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
73 if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
74 if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
75 sys = [ PSYS_PART_MAX_AGE,age,
76 PSYS_PART_FLAGS,flags,
77 PSYS_PART_START_COLOR, startColor,
78 PSYS_PART_END_COLOR, endColor,
79 PSYS_PART_START_SCALE,startSize,
80 PSYS_PART_END_SCALE,endSize,
81 PSYS_SRC_PATTERN, pattern,
83 PSYS_SRC_ACCEL, push,
89 PSYS_SRC_INNERANGLE,innerAngle,
90 PSYS_SRC_OUTERANGLE,outerAngle,
91 PSYS_SRC_OMEGA, omega,
92 PSYS_SRC_MAX_AGE, life,
93 PSYS_SRC_TEXTURE, texture,
94 PSYS_PART_START_ALPHA, startAlpha,
95 PSYS_PART_END_ALPHA, endAlpha
96 ];
97
99 }
100
101
102
103
104 default
105 {
107 {
108 //updateParticles();
109 keystate = 0 ;
110 //target = llGetLinkKey(2) ;
111 updateParticles() ;
112 //llParticleSystem([]) ;
113 }
114
115 }