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
Animal The_Blue_Whale_project  

The_Blue_Whale_project

Whale global movement script. This moves a fish ( or a whale) in a circular pattern with a inner circle. It moves the animal up 1/4 of the time in a sine wave pattern so it appears above the water. It also control splash and sound and water spoits

Category: Animal
By : Ferd Frederix
Created: 2010-05-28 Edited: 2010-05-28
Worlds: Second Life

the Zip file

Download all files for The_Blue_Whale_project
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. The_Blue_Whale_project_1.lsl
Get file # 2. The_Blue_Whale_project_2.lsl
Get file # 3. The_Blue_Whale_project_3.lsl
Get file # 4. The_Blue_Whale_project_4.lsl
Get file # 5. The_Blue_Whale_project_5.lsl
Get file # 6. The_Blue_Whale_project_6.lsl
Get file # 7. The_Blue_Whale_project_7.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 integer counter;
2
3 integer running;
4
5 rotation myrot ;
6 integer up = FALSE;
7
8 string FWD_DIRECTION = "-y";
9
10 float INTERVAL = 0.4;
11
12 vector Destination;
13 float gTau;
14
15 float DAMPING = .4; // the damping rate we turn at
16 list coords = [<193.8728,92.04382,23.0>,
17 <171.5811,62.16372,23.0>,
18 <148.1316,61.04683,23.0>,
19 <131.8011,72.83285,23.0>,
20 <131.0652,93.61875,23.0>,
21 <144.7105,105.3626,23.0>,
22 <153.7658,76.02143,23.0>,
23 <156.0498,48.00506,23.0>,
24 <150.5392,30.20997,23.0>,
25 <132.014,23.05155,23.0>,
26 <101.8122,40.96667,23.0>,
27 <50.86587,108.4027,23.0>,
28 <52.58804,123.5606,23.0>,
29 <79.25145,161.9644,23.0>,
30 <107.1218,173.8963,23.0>,
31 <145.8562,178.8377,23.0>,
32 <178.8875,159.3154,23.0>,
33 <193.4482,147.1552,23.0>,
34 <196.4373,116.8217,23.0>
35 ];
36
37 integer swim = 0;
38 float calc (float i)
39 {
40 float val = llSin((i-20)*40 / PI) * 4;
41 return val;
42
43 }
44
45 run()
46 {
47
50 }
51
52 stop()
53 {
54
57 }
58 default
59 {
61 {
62 counter = 0;
63 Destination = llList2Vector(coords,counter);
64 // llOwnerSay((string) Destination);
65 llSetStatus(STATUS_PHANTOM, TRUE);
67 llSetAlpha( 1.0, ALL_SIDES);
68 gTau = 10.0;
69
71
72 }
73
74
75 timer()
76 {
77
78 vector newdest = (llVecNorm(Destination - llGetPos()) * 3) + llGetPos();
79 swim++ ;
80 if(swim == 20)
82
83
84 if(swim == 27)
86
87
88 if(swim == 35)
90
91
92 if(swim > 37)
94
95 if(swim > 20 && swim < 40)
96 newdest.z = calc((float) swim) + 20;
97 else
98 newdest.z = 20;
99
100
101 llLookAt(newdest, 1, 1.);
102
103
104
105
106 if(swim == 80)
107 {
108 swim = 0;
109 }
110
111
112 float dist = llVecDist(Destination,llGetPos());
113
114
115
116
117 if(dist > 5.0)
118 llMoveToTarget(newdest, DAMPING);
119 else
120 {
121 llMoveToTarget(newdest, DAMPING);
122 counter++;
123 if(counter >= llGetListLength(coords))
124 counter = 0;
125
126 Destination = llList2Vector(coords,counter);
127
128 //llMoveToTarget(Destination, DAMPING);
129
130 // llOwnerSay((string) Destination);
131 }
132
133
134 }
135
137 {
138 key x = llDetectedKey(0);
139
140 if(x == llGetOwner())
141 {
142 if(running)
143 {
144 llOwnerSay("Orca stopped");
145 running = FALSE;
146 llSetAlpha( 1.0, ALL_SIDES);
147 stop();
148 llSetTimerEvent(0.0);
150 }
151 else
152 {
153 llOwnerSay("Orca running");
154 myrot = llGetRot();
155 llSetAlpha( 0.0, ALL_SIDES);
156 running = TRUE;
157 llSetTimerEvent(INTERVAL);
160 run();
161 }
162
163 }
164
165
166 }
167
168
170 {
172 }
173
174 }

The_Blue_Whale_project

Water spout script to spurt water out of the whales blowhole. Pu this in a prim just below the blowhole and aim the Z axis upwards

Category: Animal
By : Ferd Frederix
Created: 2010-05-28 Edited: 2010-05-28
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 updateParticles()
3 {
5
10
14 PSYS_SRC_ACCEL, <0.0,0.0,-1.>,
15
18 PSYS_SRC_OMEGA, <0.,0.0,0.0>,
19
21
22 PSYS_PART_START_COLOR, <1,1,1>,
23 PSYS_PART_END_COLOR, <1,1,1>,
24
27
28 PSYS_PART_START_SCALE, <.08,.8,0>,
30
31 }
32
33 default
34 {
36 {
38
39 }
40 link_message(integer sender, integer num, string str, key id)
41 {
42 if(str == "on") {
43 updateParticles();
44
45 } else if(str == "off") {
46
48 }
49 }
50
51
52 }

The_Blue_Whale_project

Pose ball with camera animation script. Put this in a round pose ball above the whale. You also need to drop an animation inside the object. This is preset for 'rooftop crouch'.

Category: Animal
By : Ferd Frederix
Created: 2010-05-28 Edited: 2010-05-28
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 // pose ball script
2 // position to sit on the ball e.g <0.0, 0.0, 0.1>
3 // sit 0.1 meter above the ball.
4 // NOTE: if all these are 0, then the sit location is removed
5
6 // position to sit on the ball e.g <0.0, 0.0, 0.43>
7 // sit 0.5 meter above the ball
8 vector POSITION=<0.0, 0.0, 0.1>;
9
10 // hovertext above ball. "" for none.
11 // add '\n ' at the end to move text up i.e.
12 // string HOVERTEXT="Sit Here\n ";
13 string HOVERTEXT="";
14
15 // Pie Menu Sit Text. Will only work for the
16 // main prim but included it anyway. If no text
17 // is entered between "" it won't be used.
18 string SIT_TEXT="";
19
20
21
22
23
24 list rgb;
25 string animation;
26 integer listener;
27 default
28 {
30 {
31
32 if(llStringLength(SIT_TEXT)>0)
33 llSetSitText(SIT_TEXT);
34 llSitTarget(POSITION, ZERO_ROTATION);
35
36
37 }
38
40 {
42 }
43
44
45 changed(integer change)
46 {
47 if(change & CHANGED_LINK)
48 {
49
51 {
53 }
54 else
55 {
57 if((perm & PERMISSION_TRIGGER_ANIMATION) && llStringLength(animation)>0)
58 llStopAnimation(animation);
59
60 animation="";
61 }
62 }
63 }
65 {
67 {
68 llStopAnimation("sit");
70 llStartAnimation(animation);
71 }
72
74 {
75 llClearCameraParams(); // reset camera to default
77 CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
78 CAMERA_BEHINDNESS_ANGLE, 15.0, // (0 to 180) degrees
79 CAMERA_BEHINDNESS_LAG, 1.0, // (0 to 3) seconds
80 CAMERA_DISTANCE, 10.0, // ( 0.5 to 10) meters
81 CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds
82 CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
83 CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
84 PITCH" title="View Definition" class="tooltip">CAMERA_PITCH, 10.0, // (-45 to 80) degrees
85 CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
86 CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
87 CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
88 CAMERA_FOCUS_OFFSET, <-2.0, 0.0, -3.0> // <-10,-10,-10> to <10,10,10> meters
89 ]);
90
91
92
93
94 }
95 }
96
97
98 }

The_Blue_Whale_project

Whale tail and fluke animation script. This script is the 'runtime' engine for the animation effects.. You will also need to teach this script with my Prim Animator scripts and a notecard called "Movement" before it will work.

Category: Animal
By : Ferd Frederix
Created: 2010-05-28 Edited: 2010-05-28
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 // User settable parameters:
3 float FLIPTIME = 1.5; // how often the tail moves, floating point.
4 string NOTECARD = "Movement"; // the notecard name, you can add any nuimber of Notecards and eitherchange this to play them, or rename one of them to this string
5
6 // global variables below - no need to modify
7
8 // These are for notecard reading
9 integer iIndexLines;
10 integer i = 0;
11 integer iMove; // N movements rea from the notecard
12 key kNoteCardLines; // the key of the notecard
13 key kGetIndexLines; // the key of the current line
14
15 // misc
16 list masterlist; // the list of coords, filled in by a notecard reader
17 integer tailcounter = 0; // this counter flips the tail up and down
18 integer STRIDE = 6; // the list we record contains 6 pieces of info
19
20 // subroutine to remove any white space before or after a string
21 string strip(string str)
22 {
23 return llStringTrim(str, STRING_TRIM);
24 }
25
26 // subroutine to get a line at index 'line' from list Input, and strip white space b4 or after
27 string Getline(list Input, integer line)
28 {
29 return strip(llList2String(Input, line));
30 }
31
32 // subroutine to Play Back a named animation
33 PlayBack (string name)
34 {
35 integer i;
36 integer iMax = llGetListLength(masterlist); // how many are in the list? we need this to know when to stop
37 // scan the entire array for the named animation
38 for (i = 0; i < iMax; i+= STRIDE)
39 {
40 string aniname2 = llList2String(masterlist,i);
41 if(aniname2 == name)
42 {
43 // convert each list element into a loal variable
44 float fPrimnum = llList2Float(masterlist,i+1);
45 vector vPrimpos = llList2Vector(masterlist,i+2);
46 rotation rPrimrot = llList2Rot(masterlist,i+3) ;
47 string sMsg = llList2String(masterlist,i+4);
48 string sUUID = llList2String(masterlist,i+5);
49
50 if(llStringLength(sMsg) > 0)
51 llSay(0,sMsg); // chat any text we find
52 if(llStringLength(sUUID) > 0)
53 llPlaySound(sUUID,1.0); // play any sound we find
54
55 if(fPrimnum < 0)
56 {
57 llSleep(-fPrimnum); // sleep the interval in the notecard
58 }
59 else
60 {
61 rPrimrot /= llGetRot(); // Add in the local rot
62
63 if(fPrimnum != 0)
64 // The new way llSetLinkPrimitiveParamsFast((integer) fPrimnum,[PRIM_POSITION,vPrimpos,PRIM_ROTATION,rPrimrot]);
65 llSetLinkPrimitiveParamsFast((integer) fPrimnum,[PRIM_POSITION,vPrimpos,PRIM_ROTATION,rPrimrot]);
66
67 }
68 }
69 }
70 }
71
72
73 default
74 {
76 {
77 kNoteCardLines = llGetNumberOfNotecardLines(NOTECARD);
78 kGetIndexLines = llGetNotecardLine(NOTECARD,0);
79 }
80
81 // read notecard on reset, once. We store this in RAM and never reset again
82 dataserver(key kQueryid, string sData)
83 {
84 if(kQueryid == kNoteCardLines)
85 iIndexLines = (integer) sData;
86
87 if(kQueryid == kGetIndexLines)
88 {
89 if(sData != EOF)
90 {
91 // read and parse the notecard line into a list of items
92 kQueryid = llGetNotecardLine(NOTECARD, i);
93 list lLine = (llParseString2List(sData, ["|"], []));
94
95 // pull each element from the notecard list so we can store it in the proper format
96 string junk = llList2String(lLine,0); // this is the time/date field and object name that was chatted into the notecard
97 string sAniname = llList2String(lLine,1); // the name of the animation
98 integer iNum = (integer)Getline(lLine,2); // the prim link number
99 vector vPos = (vector) Getline(lLine,3); // the position
100 rotation rRot = (rotation) Getline(lLine,4); // the rotation
101 string sMsg = llList2String(lLine,5); // optional chat string
102 string sUUID = llList2String(lLine,6); // option sound name or UUID
103
104 if(iNum > 1) // skip the root prim! we don't want to move it
105 {
106 if(llStringLength(sMsg) > 0)
107 llSay(0,sMsg); // chat any text in this notecard
108 if(llStringLength(sUUID) > 0)
109 llPlaySound(sUUID,1.0); // play any sound we find in the notecard
110
111 masterlist += [sAniname];
112 masterlist += [iNum];
113 masterlist += [vPos];
114 masterlist += [rRot];
115 masterlist += [sMsg];
116 masterlist += [sUUID];
117 rRot /= llGetRot(); // remove our current rotation, by subtracting.. yes, a divide is a subtract in vector math
118
119 //llSetLinkPrimitiveParamsFast(Num,[PRIM_POSITION,Pos,PRIM_ROTATION,Rot]);
120 llSetLinkPrimitiveParamsFast(iNum,[PRIM_POSITION,vPos,PRIM_ROTATION,rRot]);
121 iMove++; // count the real movement
122 }
123 i++;
124 integer iInitPerCent = (integer) llRound(( (i+1) / (float) iIndexLines) * 100);
125 llSetText("Initialising... \n" + (string) iInitPerCent + "%" , <1,1,1>, 1.0);
126 if(iInitPerCent == 100)
127 llSetText("" , <1,1,1>, 1.0);
128 kGetIndexLines = llGetNotecardLine(NOTECARD,i);
129 }
130 else
131 {
132 llOwnerSay("initialized with " + (string) iMove + " movements");
133 llSetText("" , <1,1,1>, 1.0);
134 // start the whale flipping the tail every so often
135 llSetTimerEvent(FLIPTIME);
136 }
137 }
138 }
139
140
141 // The timer code moves the prim up and down
142 timer()
143 {
144 if(tailcounter ++ %2 == 0)
145 PlayBack("up");
146 else
147 PlayBack("down");
148
149 }
150
151 }

The_Blue_Whale_project

Water splash script - this makes a circular water splash rise up at water level, no matter where the whale is. It gets activated by a linked message.

Category: Animal
By : Ferd Frederix
Created: 2010-05-28 Edited: 2010-05-28
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 float maxsysage = 0.0;
2 float maxspeed = 0.3;
3 float minspeed = 0.15;
4 float burstrad = 0.0;
5 integer burstcount = 20;
6 float burstrate = 0.01;
7 float outangle = 0.075;
8 float inangle = 0;
9 vector omega = <0.0,0.0,0.0>;
10 float startalph = 0.75;
11 float endalph = 0.015;
12 vector startscale = <2.0,2.0,2.0>;
13 vector endscale = <4.0,4.0,4.0>;
14 float maxage = 1.7;
15 vector accel = <0.0, 0.0, 1.0>;
16 string texture = "";
17
18 vector pos;
19 vector vel;
20 vector up;
21 float ground = 0.0;
22 float water = 0.0;
23 float height = 0.0;
24 float occilation = 1.25;
25 float start_mult = 0.1;
26 float rad;
27 integer occilate = TRUE;
28 integer started = FALSE;
29
30 Particles(integer part_on)
31 {
32 maxage = 0.001;
33 if(!part_on) jump particles;
34 vel = llGetVel() * 0.2;
35 ground = llGround(vel);
36 water = llWater(vel);
37 if(ground < water) {
38 maxspeed = 2.5;
39 minspeed = 1.25;
40 occilation = 2.0;
41 endscale = <3.0,3.0,3.0>;
42 maxage = 2.0;
43 ground = water;
44 texture = "7f70a931-6300-8dbc-caca-8b09a9c2cf11";
45 } else {
46 maxspeed = 1.75;
47 minspeed = 0.875;
48 occilation = 1.25;
49 endscale = <4.0,4.0,4.0>;
50 maxage = 1.75;
51 texture = "Water Particle - Mist";
52 }
53 pos = llGetPos() + vel;
54 up = llRot2Up(llGetRot());
55 height = pos.z - ground - 0.5;
56 height += (1.0 - up.z) * height;
57 if(height < 6.0 && height > -1.0) {
58 rad = 1.5 + (occilate * occilation);
59 outangle = PI - llAtan2(rad, height);
60 inangle = outangle + 0.15;
61 burstrad = rad / llSin(outangle);
62 startalph = ((llFabs(height) / -8.57) + 0.8 - (!occilate * 0.15)) * start_mult;
63 endalph = ((llFabs(height) / -200.0) + 0.04) * start_mult;
64 maxsysage = 0.0;
65 part_on = TRUE;
66 } else {
67 maxsysage = 0.01;
68 part_on = FALSE;
69 }
70
71 @particles;
72 //llParticleSystem([]);
79 PSYS_SRC_PATTERN_ANGLE_CONE,
80 PSYS_PART_START_COLOR, <1.0, 1.0, 1.0>,
81 PSYS_PART_START_ALPHA, startalph,
82 PSYS_PART_END_COLOR, <1.0, 1.0, 1.0>,
83 PSYS_PART_END_ALPHA, endalph,
84 PSYS_PART_START_SCALE, startscale,
85 PSYS_PART_END_SCALE, endscale,
86 PSYS_PART_MAX_AGE, maxage,
87 PSYS_SRC_ACCEL, accel,
88 PSYS_SRC_TEXTURE, texture,
89 PSYS_SRC_BURST_RATE, burstrate,
90 PSYS_SRC_ANGLE_BEGIN, inangle,
91 PSYS_SRC_ANGLE_END, outangle,
92 PSYS_SRC_BURST_PART_COUNT, burstcount,
93 PSYS_SRC_BURST_RADIUS, burstrad,
96 PSYS_SRC_MAX_AGE, maxsysage,
97 PSYS_SRC_OMEGA, omega
98 ]);
99
100 if(!part_on) {
102 } else {
103 if(started) {
104 if(start_mult < 1.0) {
105 start_mult += 0.075;
106 }
107 } else {
108 if(start_mult > 0.0) {
109 start_mult -= 0.05;
110 } else {
111 llSetTimerEvent(0.0);
113 }
114 }
115 occilate = !occilate;
116 }
117 }
118
119 default
120 {
122 {
123
124 llSetTimerEvent(0.0);
125 Particles(FALSE);
126 }
127
129 {
130 started = TRUE;
131 start_mult = 0.1;
132 llSetTimerEvent(0.01);
133
134 }
135 link_message(integer sender, integer num, string str, key id)
136 {
137 if(str == "on") {
138 started = TRUE;
139 start_mult = 0.1;
140 llSetTimerEvent(0.01);
141 } else if(str == "off") {
142 started = FALSE;
144 Particles(FALSE);
145 }
146 }
147
148 timer()
149 {
150 Particles(TRUE);
151 }
152 }

The_Blue_Whale_project

ArchipelisRez.txt -

Click on the...

Category: Animal
By : Ferd Frederix
Created: 2010-05-28 Edited: 2010-05-28
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 // ArchipelisRez.txt - Archipelis SARL - 2008 - www.archipelis.com
2 // With the courtesy of BestMomo Lagan.
3
4 list the_values = [
5 0.840197, 0.053115, -0.26187, 0.132,
6 0.235751, -0.629958, -0.0472265, 0.132,
7 0.342692, -0.0773743, -0.585281, 0.222,
8 0.206151, -0.740055, 0.199207, 0.132,
9 0
10 ];
11
12 integer compile_message(integer index, float the_scale)
13 {
14 the_scale = the_scale / 10.0;
15 string message = (string)the_scale;
16
17 while(llStringLength(message) < 9)
18 {
19 message += "0";
20 }
21
22 message = llGetSubString(message, 2, 8);
23
24 return (integer)((string)(index+1) + message);
25 }
26
27 default
28 {
29 touch_start(integer total_number)
30 {
31 integer the_count = (integer)(llGetListLength(the_values) / 4);
32
33 integer i;
34 for(i = 0; i < the_count; i++)
35 {
36 float the_scale = llList2Float(the_values, i * 4 + 0);
37 float x = llList2Float(the_values, i * 4 + 1);
38 float y = - llList2Float(the_values, i * 4 + 3);
39 float z = llList2Float(the_values, i * 4 + 2);
40
41 vector offset = <0.0, 0.0, 1.0>;
42 vector pos = llGetPos() + <x, y, z> + offset;
43
44 integer message = compile_message(i, the_scale);
45
46 llRezObject("ArchipelisBase", pos, ZERO_VECTOR, ZERO_ROTATION, message);
47 }
48 }
49 }

The_Blue_Whale_project

ArchipelisBase.txt - form more help, see http://www.archipelis.com/userManual.php

Go in build mode with the menu "View > Build B". Click on "Create" button. Click somewhere on the floor to create an object (whatever it is, cube, cylinder...). Here it is important to set the name "ArchipelisBase" to this object.

Drag and drop all the previously generated images that are now in "My Inventory > Textures" into the content of the current object you are editing.

Click on "Content". Click on "New Script...". Double click on the script called "New Script" that has been created. Copy the content of the file called "ArchipelisBase.txt". Replace the definition of the script by a paste action. Click on "Save" button and close the script window.

Select the object you are editing and with the right mouse button click on "Take" to put it into "My Inventory / Objects".

Category: Animal
By : Ferd Frederix
Created: 2010-05-28 Edited: 2010-05-28
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 // ArchipelisBase.txt - Archipelis SARL - 2008 - www.archipelis.com
2 // With the courtesy of BestMomo Lagan.
3
4 string generate_index(integer i)
5 {
6 if(i < 10)
7 return "0" + (string)i;
8
9 return (string)i;
10 }
11
12 default
13 {
14 on_rez(integer start_param)
15 {
16 if(start_param == 0)
17 return;
18
19 string message = (string)start_param;
20 integer message_size = llStringLength(message);
21 string index;
22 string the_scale;
23
24 if(message_size == 9)
25 {
26 index = llGetSubString(message, 0, 1);
27 the_scale = "0." + llGetSubString(message, 2, 8);
28 }
29 else if(message_size == 8)
30 {
31 index = "0" + llGetSubString(message, 0, 0);
32 the_scale = "." + llGetSubString(message, 1, 7);
33 }
34 else
35 {
36 index = "00";
37 the_scale = "." + llGetSubString(message, 0, 6);
38 }
39
40 index = generate_index(((integer)index) - 1);
41
42 rotation the_rotation = llEuler2Rot(<90.0 * DEG_TO_RAD, .0, .0>);
43 llSetRot(the_rotation);
44
45 float the_scale_value = (float)the_scale * 2.0 * 10.0;
46 llSetScale(<the_scale_value, the_scale_value, the_scale_value>);
47
48 string geometry = "geometry_" + index;
50
51 string texture = "texture_" + index;
53 llSetTexture(texture, ALL_SIDES);
54 }
55 }

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