zzzz

Join us in Phaze Demesnes or follow us:

Home   Show All
Category: Contributor: Creator
Water Waterfall_Mist  

Waterfall_Mist

Waterfall Mist.lsl

Category: Water
By : Anonymous
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life + OpenSim

the Zip file

Download all files for Waterfall_Mist
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Waterfall_Mist_1.lsl
1
2 // Particle System 1.0
3
4 StartSteam()
5 {
6 // MASK FLAGS: set to "TRUE" to enable
7 integer glow = TRUE; // Makes the particles glow
8 integer bounce = FALSE; // Make particles bounce on Z plane of objects
9 integer interpColor = TRUE; // Color - from start value to end value
10 integer interpSize = TRUE; // Size - from start value to end value
11 integer wind = FALSE; // Particles effected by wind
12 integer followSource = FALSE; // Particles follow the source
13 integer followVel = TRUE; // Particles turn to velocity direction
14
15
16
17 // Choose a pattern from the following:
18 // PSYS_SRC_PATTERN_EXPLODE
19 //PSYS_SRC_PATTERN_DROP
20 // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
21 // PSYS_SRC_PATTERN_ANGLE_CONE
22 // PSYS_SRC_PATTERN_ANGLE
23 integer pattern = PSYS_SRC_PATTERN_EXPLODE;
24
25 // Select a target for particles to go towards
26 // "" for no target, "owner" will follow object owner
27 // and "self" will target this object
28 // or put the key of an object for particles to go to
29 key target;
30
31
32 // Particle paramaters
33
34 float age = 3; // Life of each particle
35 float maxSpeed = 0.05; // Max speed each particle is spit out at
36 float minSpeed = 0.0; // Min speed each particle is spit out at
37 string texture = "dcab6cc4-172f-e30d-b1d0-f558446f20d4"; // Texture used for particles, default used if blank
38 float startAlpha = .25; // Start alpha (transparency) value
39 float endAlpha = 0.0; // End alpha (transparency) value
40 vector startColor = <0.9,0.9,1>; // Start color of particles <R,G,B>
41 vector endColor = <1,1,1>; // End color of particles <R,G,B> (if interpColor == TRUE)
42 vector startSize = <.25,.25,.25>; // Start size of particles
43 vector endSize = <3,3,3>; // End size of particles (if interpSize == TRUE)
44 vector push = <0,0,-0.5>; // Force pushed on particles
45
46 // System paramaters
47
48 float rate = 0.1; // How fast (rate) to emit particles
49 float radius = 1.0; // Radius to emit particles for BURST pattern
50 integer count = 16; // How many particles to emit per BURST
51 float outerAngle = 0.1; // Outer angle for all ANGLE patterns
52 float innerAngle = 0.65; // Inner angle for all ANGLE patterns
53 vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source
54 float life = 0; // Life in seconds for the system to make particles
55
56 // Script variables
57
58 integer flags;
59
60
61 flags = 0;
62 if (target == "owner") target = llGetOwner();
63 if (target == "self") target = llGetKey();
64 if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
65 if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
66 if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
67 if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
68 if (wind) flags = flags | PSYS_PART_WIND_MASK;
69 if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
70 if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
71 if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
72
74 PSYS_PART_FLAGS,flags,
75 PSYS_PART_START_COLOR, startColor,
76 PSYS_PART_END_COLOR, endColor,
77 PSYS_PART_START_SCALE,startSize,
78 PSYS_PART_END_SCALE,endSize,
79 PSYS_SRC_PATTERN, pattern,
81 PSYS_SRC_ACCEL, push,
87 PSYS_SRC_INNERANGLE,innerAngle,
88 PSYS_SRC_OUTERANGLE,outerAngle,
89 PSYS_SRC_OMEGA, omega,
90 PSYS_SRC_MAX_AGE, life,
91 PSYS_SRC_TEXTURE, texture,
92 PSYS_PART_START_ALPHA, startAlpha,
93 PSYS_PART_END_ALPHA, endAlpha
94 ]);
95
96 }
97 StartSpray ()
98 {
99
100 }
101
102 StopSpray()
103 {
105 }
106
107
108
109 default
110 {
112 {
113 StartSteam();
115 }
116
117 listen(integer channel, string name, key id, string message)
118 {
119
120 if (0 == llSubStringIndex(message, "spray on"))
121 {
122 StartSteam();
123
124 }
125 else if (0 == llSubStringIndex(message, "spray off"))
126 {
127 StopSpray();
128 }
129 }
130 }
131
132 // END //