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 engine_effect  

engine_effect

engine effect.lsl

Category: Particles
By : nick failight
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for engine_effect
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. engine_effect_1.lsl
1
2
3 //edited by nick fairlight
4 // Mask Flags - set to TRUE to enable
5 integer glow = FALSE; // Make the particles glow
6 integer bounce = FALSE; // Make particles bounce on Z plan of object
7 integer interpColor = TRUE; // Go from start to end color
8 integer interpSize = TRUE; // Go from start to end size
9 integer wind = FALSE; // Particles effected by wind
10 integer followSource = FALSE; // Particles follow the source
11 integer followVel = TRUE; // Particles turn to velocity direction
12
13 // Choose a pattern from the following:
14 // PSYS_SRC_PATTERN_EXPLODE
15 // PSYS_SRC_PATTERN_DROP
16 // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
17 // PSYS_SRC_PATTERN_ANGLE_CONE
18 // PSYS_SRC_PATTERN_ANGLE
19 integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE;
20
21 // Select a target for particles to go towards
22 // "" for no target, "owner" will follow object owner
23 // and "self" will target this object
24 // or put the key of an object for particles to go to
25 key target = "";
26
27 // Particle paramaters
28 float age = 1.6; //How long particles last
29 float maxSpeed = .1; //The fastest they will go
30 float minSpeed = .1; //The slowest they will go
31 string texture = ""; //Particle texture, if blank its set to delault orb type.
32 float startAlpha = 0; //don't change yet, not sure what this is.
33 float endAlpha = 1; //don't change yet, not sure what this is.
34 vector startColor = <0,1,0>; //Starting color stream
35 vector endColor = <.2,3,.0>; // Color of particles at end of stream
36 vector startSize = <.4,.4,.3>; //Size of particles at the start
37 vector endSize = <.1,.1,.1>; //Sizes of particles at end of stream
38 vector push = <0,0,0>; //Physical style push in a vector direction
39
40 // System paramaters
41 float rate = .001; // How fast to emit particles
42 float radius = 0; // Radius to emit particles for BURST pattern
43 integer count = 1; // How many particles to emit per BURST
44 float outerAngle = TWO_PI; // Outer angle for all ANGLE patterns
45 float innerAngle = PI; // Inner angle for all ANGLE patterns
46 vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source
47 float life = 0; //Not sure what this is yet
48
49
50
51 // Script variables
52 integer flags;
53
54 updateParticles()
55 {
56 if(target == "owner") target = llGetOwner();
57 if(target == "self") target = llGetKey();
58 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
59 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
60 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
61 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
62 if(wind) flags = flags | PSYS_PART_WIND_MASK;
63 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
64 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
65 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
66
67
68
70 PSYS_PART_FLAGS,flags,
71 PSYS_PART_START_COLOR, startColor,
72 PSYS_PART_END_COLOR, endColor,
73 PSYS_PART_START_SCALE,startSize,
74 PSYS_PART_END_SCALE,endSize,
75 PSYS_SRC_PATTERN, pattern,
77 PSYS_SRC_ACCEL, push,
83 PSYS_SRC_INNERANGLE,innerAngle,
84 PSYS_SRC_OUTERANGLE,outerAngle,
85 PSYS_SRC_OMEGA, omega,
86 PSYS_SRC_MAX_AGE, life,
87 PSYS_SRC_TEXTURE, texture,
88 PSYS_PART_START_ALPHA, startAlpha,
89 PSYS_PART_END_ALPHA, endAlpha
90 ]);
91 }
92 default
93 {
95 {
96 updateParticles();
98 }
99
100 timer()
101 {
102
103 }
104 }
105
106 // END //

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