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
Halloween Broomsticks  

Broomsticks

Smoke

Category: Halloween
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life

the Zip file

Download all files for Broomsticks
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. bling.lsl
Get file # 2. flight.lsl
Get file # 3. particles.lsl
Get file # 4. poofers.lsl
Get file # 5. smoke.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 vector prior;
3
4
5 default
6 {
8 {
10 llSetTimerEvent(0.5);
11 }
12
13
15 {
17 }
18
19 timer()
20 {
21 if(llVecDist(prior,llGetPos()) > 0.1)
22 {
23 prior = llGetPos();
25 [
28 PSYS_SRC_PATTERN_ANGLE_CONE,
32 PSYS_PART_START_COLOR, <0.0, 0.0, 0.1>,
33 PSYS_PART_END_COLOR, <0.5, 0.5, 0.5>,
34 PSYS_PART_START_SCALE ,<.5,.3,.3>,
35 PSYS_PART_END_SCALE ,<1,1,.6>,
37 ]);
38 }
39 else
40 {
42 }
43
44 }
45
46 }

Broomsticks

particles

Category: Halloween
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3
4
5 integer timer_count = 0;
6 integer mode = 3;
7 key owner;
8 integer f = 0;
9 integer glow = FALSE;
10 integer bounce = FALSE;
11 integer interpColor = TRUE;
12 integer interpSize = TRUE;
13 integer wind = FALSE;
14 integer followSource = FALSE;
15 integer followVel = FALSE;
16 integer pattern = PSYS_SRC_PATTERN_EXPLODE;
17 key target = "";
18 float age = 10;
19 float maxSpeed = 0.25;
20 float minSpeed = 0.1;
21 string texture="";
22 float startAlpha = 0.5;
23 float endAlpha = 0;
24 vector startColor = <1,1,0>;
25 vector endColor = <0,0,0>;
26 vector startSize = <0.1,0.1,0.1>;
27 vector endSize = <.1,.10,.10>;
28 vector push = <0,0,0>;
29 float rate = .1;
30 float radius = 1;
31 integer count = 10;
32 float outerAngle = 0;
33 float innerAngle = 0;
34 vector omega = <0,0,0>;
35 float life = 0;
36 integer flags;
37
38 updateParticles()
39 {
40 flags = 0;
41 if(target == "owner") target = llGetOwner();
42 if(target == "self") target = llGetKey();
43 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
44 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
45 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
46 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
47 if(wind) flags = flags | PSYS_PART_WIND_MASK;
48 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
49 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
50 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
51
53 PSYS_PART_FLAGS,flags,
54 PSYS_PART_START_COLOR, startColor,
55 PSYS_PART_END_COLOR, endColor,
56 PSYS_PART_START_SCALE,startSize,
57 PSYS_PART_END_SCALE,endSize,
58 PSYS_SRC_PATTERN, pattern,
60 PSYS_SRC_ACCEL, push,
66 PSYS_SRC_INNERANGLE,innerAngle,
67 PSYS_SRC_OUTERANGLE,outerAngle,
68 PSYS_SRC_OMEGA, omega,
69 PSYS_SRC_MAX_AGE, life,
70 PSYS_SRC_TEXTURE, texture,
71 PSYS_PART_START_ALPHA, startAlpha,
72 PSYS_PART_END_ALPHA, endAlpha
73 ]);
74 }
75
76 default
77 {
78
79
80 on_rez(integer start_param)
81 {
82 owner = llGetOwner();
84 }
85 link_message(integer sender_num, integer num, string str, key id)
86 {
87 if((str == "particles on"))
88 {
89 rate = 0.01;
90 count = 2;
91 updateParticles();
92 }
93
94
95 if((str == "unseated") || (str == "particles off"))
96 {
98 }
99 }
100
101 }
102
103
104

Broomsticks

flight script

Category: Halloween
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 // Cubey Terra Helicopter Style Flight script
3
4 // Do not delete these script credits! If you modify this script, *add* your name and date and make your work available in Public Domain.
5
6 // * Portions based on a public-domain flight script from Jack Digeridoo.
7 // * Portions based on hoverboard script by Linden Lab.
8 // * Nov 30, 2003 - Significant modifications and additions by Cubey Terra... (apologies for the crappy indenting). -CT
9 // * Jan 11, 2004 - Fixed listen bug. Thanks to Trimming Hedges for the solution. -TH
10 // * March 27, 2004 - Adapted to work as helicopter-style vehicle -CT
11 // * April 8, 2004 - Adapted to work as U-Fly Taxi -CT
12 // * April 15, 2004 - Adapted to work as DIY helicopter script -CT
13 // * ???, 2004 - Adapted to work as magic carpet. -CT
14 // * April 10, 2006 - Released to public. Tidied some code. Added beacon. Allowed anyone to pilot, no longer keyed to owner. -CT
15 // modified to be a borrom - Ferd Frederix
16
17 integer sit = FALSE;
18
19 integer brake = TRUE;
20
21
22 float X_THRUST = 20;
23 float Z_THRUST = 15;
24
25 float xMotor;
26 float zMotor;
27
28 key agent;
29 key pilot;
30
31 vector SIT_POS = <0.25, 0.0, 0.65>;
32 vector CAM_OFFSET = <-5.0, 0.0, 2.0>;
33 vector CAM_ANG = <0.0, 0.0, 2.0>;
34
35
36 help()
37 {
38 llWhisper(0,"O Master of the broom, you may use these commands to fly me...");
39 llWhisper(0," PgUp/PgDn or E/C = hover up/down");
40 llWhisper(0," Arrow keys or WASD = forward, back, left, right");
41 llWhisper(0," Say HELP to display help.");
42 }
43
44
45 default {
47 {
48 llSetSitText("Fly");
49 llSitTarget(SIT_POS, ZERO_ROTATION);
50 llSetCameraEyeOffset(CAM_OFFSET);
51 llSetCameraAtOffset(CAM_ANG);
52 llCollisionSound("",0.0);
53
54
55 //SET VEHICLE PARAMETERS
57
59
60
61 // uniform angular friction
63
64 // linear motor
66 llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 2 );
68
69 // agular motor
72 llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, .4);
73
74 // hover
79
80 // no linear deflection
83
84 // no angular deflection
87
88 // no vertical attractor
91
92 // banking
96
97
98 // default rotation of local frame
100
101 // remove these flags
109
110 }
111
112 on_rez(integer num)
113 {
115 pilot = llGetOwner();
116 llSetTimerEvent(300); // death timer
117 }
118
119
120
121
122 // DETECT AV SITTING/UNSITTING AND GIVE PERMISSIONS
123 changed(integer change)
124 {
125 agent = llAvatarOnSitTarget();
126 if(change & CHANGED_LINK)
127 {
128 if((agent == NULL_KEY) && (sit))
129 {
130 //
131 // Avatar gets off vehicle
132 //
134 llStopAnimation("broomsit2");
135 llMessageLinked(LINK_SET, 0, "unseated", "");
138 sit = FALSE;
139 }
140 else if((agent == llGetOwner()) && (!sit))
141 {
142 //
143 // Avatar gets on vehicle
144 //
145 pilot = llAvatarOnSitTarget();
146 sit = TRUE;
148
149 llWhisper(0,"O Master of the Broom, "+llKey2Name(pilot)+", command me as you will. Should you need assistance, please speak the word HELP.");
150 llMessageLinked(LINK_SET, 0, "seated", "");
151 }
152
153
154 }
155 }
156
157
158
159 //CHECK PERMISSIONS AND TAKE CONTROLS
161 {
163 {
165 }
167 {
168 llStartAnimation("broomsit2");
169 llStopAnimation("sit");
170 }
171 }
172
173
174
175
176
177 //FLIGHT CONTROLS
178 control(key id, integer level, integer edge)
179 {
180
181 vector angular_motor;
182
183
184 if((level & CONTROL_FWD) || (level & CONTROL_BACK))
185 {
186 if(edge & CONTROL_FWD) xMotor = X_THRUST;
187 if(edge & CONTROL_BACK) xMotor = -X_THRUST;
188 }
189 else
190 {
191 xMotor = 0;
192 }
193
194
195 if((level & CONTROL_UP) || (level & CONTROL_DOWN))
196 {
197 if(level & CONTROL_UP)
198 {
199 zMotor = Z_THRUST;
200 }
201 if(level & CONTROL_DOWN)
202 {
203 zMotor = -Z_THRUST;
204 }
205 }
206 else
207 {
208 zMotor = 0;
209 }
210
212
213
214
215 if(level & CONTROL_RIGHT) {
216 angular_motor.x = TWO_PI;
217 angular_motor.y /= 8;
218 }
219 if(level & CONTROL_LEFT) {
220 angular_motor.x = -TWO_PI;
221 angular_motor.y /= 8;
222 }
223
224 if(level & CONTROL_ROT_RIGHT) {
225 angular_motor.x = TWO_PI;
226 angular_motor.y /= 8;
227 }
228
229 if(level & CONTROL_ROT_LEFT) {
230 angular_motor.x = -TWO_PI;
231 angular_motor.y /= 8;
232 }
233
235 }
236
237 timer()
238 {
239 llDie();
240 }
241 }

Broomsticks

Particles

Category: Halloween
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3
4 integer seated = FALSE;
5 integer particles_on = FALSE;
6
7
8
9 default
10 {
11
12 on_rez(integer num)
13 {
15 }
16
17
18 timer()
19 {
20
21 // Speed
22 integer speed = (integer)(llVecMag(llGetVel()) * 1.94384449 + 0.5);
23
24 if(speed > 5)
25 {
26 if(!particles_on)
27 {
28 llMessageLinked(LINK_SET, 0, "particles on", "");
29 particles_on = TRUE;
30 }
31 }
32 else
33 {
34 if(particles_on)
35 {
36 llMessageLinked(LINK_SET, 0, "particles off", "");
37 particles_on = FALSE;
38 }
39
40 }
41
42
43 }
44
45
46
47
48 link_message(integer sender_number, integer number, string message, key id)
49 {
50
51
52 if(message == "seated")
53 {
54 seated = TRUE;
55 llSetTimerEvent(0.5);
56 }
57
58 else if(message == "unseated")
59 {
60 seated = FALSE;
61 llSetTimerEvent(0.0);
62 llMessageLinked(LINK_SET, 0, "particles off", "");
63 particles_on = FALSE;
64 }
65
66
67
68 }
69
70
71 }
72
73

Broomsticks

Bling for handle

Category: Halloween
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

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

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