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
Buckyball BuckyBall  

BuckyBall

Buckyball

Category: Buckyball
By : Anonymous
Created: 2013-09-06 Edited: 2013-09-07
Worlds: Second Life

the Zip file

Download all files for BuckyBall
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Script.lsl
1
2 list points = [
3 <-0.265,0.328,-0.695>,
4 <-0.164,-0.796,0.000>,
5 <0.594,-0.531,0.164>,
6 <0.000,0.164,0.796>,
7 <-0.164,-0.594,0.531>,
8 <-0.796,0.000,0.164>,
9 <0.164,-0.594,0.531>,
10 <-0.531,0.164,-0.594>,
11 <0.164,0.594,-0.531>,
12 <0.328,0.695,-0.265>,
13 <-0.594,-0.531,0.164>,
14 <-0.594,0.531,-0.164>,
15 <-0.164,-0.594,-0.531>,
16 <-0.265,-0.328,-0.695>,
17 <-0.695,-0.265,0.328>,
18 <0.695,0.265,0.328>,
19 <-0.164,0.796,0.000>,
20 <0.695,0.265,-0.328>,
21 <-0.328,0.695,0.265>,
22 <-0.695,-0.265,-0.328>,
23 <0.796,0.000,0.164>,
24 <0.265,-0.328,0.695>,
25 <0.695,-0.265,-0.328>,
26 <0.000,-0.164,-0.796>,
27 <0.000,-0.164,0.796>,
28 <0.164,0.594,0.531>,
29 <-0.695,0.265,-0.328>,
30 <-0.328,0.695,-0.265>,
31 <0.164,-0.796,0.000>,
32 <0.695,-0.265,0.328>,
33 <-0.531,-0.164,-0.594>,
34 <0.531,0.164,0.594>,
35 <0.265,0.328,0.695>,
36 <0.594,0.531,-0.164>,
37 <-0.594,-0.531,-0.164>,
38 <0.265,-0.328,-0.695>,
39 <0.328,-0.695,0.265>,
40 <0.796,0.000,-0.164>,
41 <-0.531,0.164,0.594>,
42 <-0.695,0.265,0.328>,
43 <-0.265,-0.328,0.695>,
44 <0.594,-0.531,-0.164>,
45 <-0.164,0.594,0.531>,
46 <-0.265,0.328,0.695>,
47 <0.164,0.796,0.000>,
48 <-0.531,-0.164,0.594>,
49 <0.265,0.328,-0.695>,
50 <0.164,-0.594,-0.531>,
51 <0.531,0.164,-0.594>,
52 <0.531,-0.164,0.594>,
53 <-0.164,0.594,-0.531>,
54 <0.328,0.695,0.265>,
55 <0.594,0.531,0.164>,
56 <-0.328,-0.695,-0.265>,
57 <0.000,0.164,-0.796>,
58 <-0.796,0.000,-0.164>,
59 <0.531,-0.164,-0.594>,
60 <0.328,-0.695,-0.265>,
61 <-0.328,-0.695,0.265>,
62 <-0.594,0.531,0.164>
63 ];
64
65 integer totalNumberOfObjects = 0;
66 integer rezCount = 0;
67
68
69 default {
70 on_rez(integer start_param) { llResetScript(); }
71
72 state_entry() {
73 llOwnerSay("Touch to Make Ball - Replace BallObject to change point");
74 }
75
76
77 touch_start(integer total_number) {
78 llOwnerSay("Start");
80 llOwnerSay( "Found: " + rezObjName );
81 vector centerPos = llGetPos();
82
83 totalNumberOfObjects = llGetListLength(points);
84 integer i;
85 for(i=0; i<totalNumberOfObjects; i++) {
86 vector pos = llList2Vector(points, i);
87 pos *=9;
88 llRezObject( rezObjName, centerPos - pos, ZERO_VECTOR, ZERO_ROTATION, i );
89 }
90 }
91
92
93 object_rez(key id) {
94 rezCount++;
95 llOwnerSay("rezed: " + (string)rezCount);
96 if(rezCount>=totalNumberOfObjects) {
97 string scriptName = llGetScriptName();
98 llOwnerSay("Done - Die : " + scriptName);
99 llDie();
100 }
101 }
102
103 }
104
105
106
107
108
109
110
111
112 integer what;
113 generalParticleEmitterOn()
114 {
117 //| PSYS_PART_BOUNCE_MASK //Bounce on object's z-axis
118 //| PSYS_PART_WIND_MASK //Particles are moved by wind
119 //| PSYS_PART_INTERP_COLOR_MASK //Colors fade from start to end
120 | PSYS_PART_INTERP_SCALE_MASK //Scale fades from beginning to end
121 | PSYS_PART_FOLLOW_SRC_MASK //Particles follow the emitter
122 //| PSYS_PART_FOLLOW_VELOCITY_MASK//Particles are created at the velocity of the emitter
123 //| PSYS_PART_TARGET_POS_MASK //Particles follow the target
124 | PSYS_PART_EMISSIVE_MASK //Particles are self-lit (glow)
125 //| PSYS_PART_TARGET_LINEAR_MASK//Undocumented--Sends particles in straight line?
126 ,
127
128 //PSYS_SRC_TARGET_KEY , NULL_KEY,//The particles will head towards the specified key
129 //Select one of the following for a pattern:
130 //PSYS_SRC_PATTERN_DROP Particles start at emitter with no velocity
131 //PSYS_SRC_PATTERN_EXPLODE Particles explode from the emitter
132 //PSYS_SRC_PATTERN_ANGLE Particles are emitted in a 2-D angle
133 //PSYS_SRC_PATTERN_ANGLE_CONE Particles are emitted in a 3-D cone
134 //PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY Particles are emitted everywhere except for a 3-D cone
135
137
138 ,PSYS_SRC_TEXTURE, "f00bcb1e-8ba3-6d14-4ad6-79ed05c0a1d6" //UUID of the desired particle texture, or inventory name
139 ,PSYS_SRC_MAX_AGE, 0.0 //Time, in seconds, for particles to be emitted. 0 = forever
140 ,PSYS_PART_MAX_AGE, 2.0 //Lifetime, in seconds, that a particle lasts
141 ,PSYS_SRC_BURST_RATE, 1.0 //How long, in seconds, between each emission
142 ,PSYS_SRC_BURST_PART_COUNT, 1 //Number of particles per emission
143 ,PSYS_SRC_BURST_RADIUS, 0.1 //Radius of emission
144 ,PSYS_SRC_BURST_SPEED_MIN, .0 //Minimum speed of an emitted particle
145 ,PSYS_SRC_BURST_SPEED_MAX, .0 //Maximum speed of an emitted particle
146 ,PSYS_SRC_ACCEL, <0.0,0,.0> //Acceleration of particles each second
147 ,PSYS_PART_START_COLOR, <1.0,1.0,1.0> //Starting RGB color1
148 ,PSYS_PART_END_COLOR, <1.0,1.0,1.0> //Ending RGB color, if INTERP_COLOR_MASK is on
149 ,PSYS_PART_START_ALPHA, 1.0 //Starting transparency, 1 is opaque, 0 is transparent.
150 ,PSYS_PART_END_ALPHA, 1.0 //Ending transparency
151 ,PSYS_PART_START_SCALE, <1.0,1.0,1.0> //Starting particle size
152 ,PSYS_PART_END_SCALE, <1.0,1.0,1.0> //Ending particle size, if INTERP_SCALE_MASK is on
153 ,PSYS_SRC_ANGLE_BEGIN, 0 * DEG_TO_RAD //Inner angle for ANGLE patterns
154 ,PSYS_SRC_ANGLE_END, 1 * DEG_TO_RAD//Outer angle for ANGLE patterns
155 ,PSYS_SRC_OMEGA, <1.0,1.0,0.0> //Rotation of ANGLE patterns, similar to llTargetOmega()
156 ]);
157 }
158
159
160 default
161 {
163 {
164
165 generalParticleEmitterOn();
166
167 llListen( 0, "", llGetOwner(), "" );
168
169 }
170
171
172 listen(integer channel, string name, key id, string msg)
173 {
174 if(msg == "die")
175 {
176 llParticleSystem( [ ] );
177 // stop timer
179 llDie();
180 }
181 }
182 }

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