-
VU island terrain
The wonderful Elena Hurse created some .raw terrain maps for us, 6 all up. They look even better than what I sent her to replicate.
The island from above using the map view.

The island from the top left of the 'V', I am standing on the road there(which has room for parking, it's wide), just to give you a sense of scale(it's big).
-
Maths and music education tools for Second Life and Open Sim
This is a demonstration of several learning tools we have developed in conjunction with Debney Park Secondary College and Soundhouse for use in the virtual world Second Life. The first tool is for use in the teaching of year seven maths. It allows students to explore the mathematical relationship between the size of 5 objects and their volumes. Upon clicking the volume machine students are presented with what type of shape it is, and option to modify it's height, width, and length. This will cause the shape in the machine to change, showing the students what the new volume is. The equation which causes each shape is shown at the top of each volume machine. There are five different volume machines, a cube, a cylinder, a cone, a pyramid and a sphere. The aim of this tool is to help students understand practical applications of mathematics in an engaging 3 dimensional environment.
The second tool is a couple of simple scripts which will allow students to create virtual musical ensembles. The first object contains a script which will play a single sound once. The second object contains a script which will play a continuous loop, until the object is clicked again. Using these scripts, students are able to build their own instruments and place their own pre-recorded sounds inside. 
-
Music Scripts
These two script can be used to make a musical machine. There are two different scripts, the first script will play a sound once. The second script will start a loop playing when it is touched and will stop when it is touched again. To use each script simply create a prim place the script in the prim as well as the sound to be played.
Loop Sound Script:
//loops a sound default { touch_start(integer total_number) { llLoopSound(llGetInventoryName(INVENTORY_SOUND,0), 1.0); state on; } } state on { touch_start(integer total_number) { llStopSound(); state default; } } //Script end
Play Sound Script:
//plays a sound once default { touch_start(integer total_number) { llPlaySound(llGetInventoryName(INVENTORY_SOUND,0), 1.0); } } //End script
-
Maths Volume Machine Scripts
The following scripts are for the maths volume machine. The machine will calculate the volume of an object according to the dimensions given by the user. There are 5 possible shapes Cone,Cube,Cylinder,Pyramid and Sphere. After the dimensions have been entered the shape will change size to show the difference in volume.Colored beams of light will appear to go into the prim that is changing shape while it is changing.
To use these scripts place the control script in the root prim. This will be the prim that the user touches to start the machine as well as the prim that the results will be shown above.
Then place the slave script in the prim that will be changing shape.
To use the particle script place a prim above and below the prim that the slave script is in. Then place a copy of the particle script in each. Place the down particle script in the prim above and the rising particle script in the prim below.
Then select all of the prims selecting the control prim last and link them all.
-
Particle Script for all shapes
Place this script in the prims above and below the prim that is changing shape. These will be the prims that the colored beams will be coming out of. Make the prims that the particle script is in the colour that you want the beam to be.
Rising Particle:
vector colour; default { state_entry() { colour=llGetColor(ALL_SIDES); } link_message(integer sender_number, integer number, string message, key id) { if (message=="start") { float rate = .1 ; float age = 1.0 ; integer count = 10 ; llParticleSystem( [ PSYS_PART_INTERP_SCALE_MASK, PSYS_PART_INTERP_COLOR_MASK, PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP, PSYS_SRC_BURST_PART_COUNT,(integer) count, PSYS_SRC_BURST_RATE,(float) rate, PSYS_PART_MAX_AGE,(float) age, PSYS_SRC_ACCEL,(vector) <0,0,1.0>,//change to <0,0,-1.0> for down particle PSYS_SRC_BURST_SPEED_MIN,(float) .5, PSYS_SRC_BURST_SPEED_MAX,(float) .5, PSYS_PART_START_SCALE,(vector) <.1,1,.1>, PSYS_PART_START_COLOR,(vector) colour, // Start Color, (RGB, 0 to 1) set to colour of the slave prim PSYS_PART_END_COLOR,(vector) <1,1,1>, PSYS_SRC_MAX_AGE,(float) 5.0, PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_COLOR_MASK | 0 ] ); llResetScript(); } else { llResetScript(); } } }
Down Particle:
vector colour; default { state_entry() { colour=llGetColor(ALL_SIDES); } link_message(integer sender_number, integer number, string message, key id) { if (message=="start") { float rate = .1 ; float age = 1.0 ; integer count = 10 ; llParticleSystem( [ PSYS_PART_INTERP_SCALE_MASK, PSYS_PART_INTERP_COLOR_MASK, PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP, PSYS_SRC_BURST_PART_COUNT,(integer) count, PSYS_SRC_BURST_RATE,(float) rate, PSYS_PART_MAX_AGE,(float) age, PSYS_SRC_ACCEL,(vector) <0,0,-1.0>,//change to <0,0,-1.0> for down particle PSYS_SRC_BURST_SPEED_MIN,(float) .5, PSYS_SRC_BURST_SPEED_MAX,(float) .5, PSYS_PART_START_SCALE,(vector) <.1,1,.1>, PSYS_PART_START_COLOR,(vector) colour, // Start Color, (RGB, 0 to 1) set to colour of the slave prim PSYS_PART_END_COLOR,(vector) <1,1,1>, PSYS_SRC_MAX_AGE,(float) 5.0, PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_COLOR_MASK | 0 ] ); llResetScript(); } else { llResetScript(); } } }
-
Sphere Scripts
These scripts are for the Sphere shape. To use these scripts place the control script in the root prim. Then place the slave script in the prim that will be changing shape.
Control Script:
// this script is placed in the main control prim for a sphere key id; float radiusSize; float volumeSize; default { touch_start(integer total_number) { id = llDetectedKey(0); llMessageLinked(LINK_ALL_CHILDREN,0,"Cone",id); state radius; } }
state radius { link_message(integer sender_number, integer number, string message, key id) { radiusSize=(float)message; state display; } } state display { state_entry() { volumeSize=(4.0/3.0)*PI*((radiusSize*radiusSize)*radiusSize); llInstantMessage(id,"Volume is: "+(string)volumeSize +"\n Radius is: "+(string)radiusSize); llSetText("Volume is: "+(string)volumeSize +"\n Radius is: "+(string)radiusSize, <0.0,>, 1.0); llMessageLinked(LINK_ALL_CHILDREN,0,"reset",id); llResetScript(); } }
Slave Script:
//place in the prim you want to change shape for a sphere //global variables float lengthSize; float widthSize; float radiusSize; float volumeSize; integer channel; integer shape; integer phantom=FALSE; vector top_size=<1.0,1.0,0.0>; vector startSize=<2.0,2.0,2.0>;//starting size of prim string usermessage; key id2; //dialog list items list listc= [".2", ".4", ".6", ".8", "1", "1.2", "1.4", "1.6", "1.8","2"]; list listd= ["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"]; list liste=["Yes","No"]; string menuHeight="Please Enter Height:"; string menuRadius="Please Enter Radius:"; string menurestart="Would You Like To Continue"; //============================================ //user defined functions primsize() { float z= lengthSize; float x= lengthSize; float y= widthSize; llSetScale(); } primshape() { llSetPrimitiveParams([ PRIM_PHANTOM,phantom, PRIM_TYPE,shape, PRIM_HOLE_DEFAULT, <0.0,1.0,0.0>, 0.0, ZERO_VECTOR, <0.0,1.0,0.0>]); }
spherevolume() { volumeSize=(4.0/3.0)*PI*((radiusSize*radiusSize)*radiusSize); } reset() { llSleep(2.0); llResetScript(); } //====================================== //Script states default { state_entry() { channel=(integer)llFrand(1000.0); llListen(channel,"", id2,""); } link_message(integer sender_number, integer number, string message, key id) { id2=id; usermessage=message; if (message=="Square") { llResetScript(); } else if (message=="Pyramid") { llResetScript(); } else if (message=="Cylinder") { llResetScript(); } else if (message=="Cone") { shape=PRIM_TYPE_SPHERE; primshape(); state radiusState; } } } //state to get radius state radiusState { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuRadius, listd,channel); } listen(integer channel, string name, key id, string message) { radiusSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)radiusSize,""); lengthSize=radiusSize*2; widthSize=lengthSize; llOwnerSay("Length"+message); if (usermessage=="Cylinder") { llResetScript(); } else if (usermessage=="Square") { llResetScript(); } else if (usermessage=="Pyramid") { llResetScript(); } else if (usermessage=="Cone") { spherevolume(); state display; } } } //state for display size state display { state_entry() { llMessageLinked(LINK_ALL_CHILDREN,0,"start",""); llSleep(4.0); primsize(); } link_message(integer sender_number, integer number, string message, key id) { if (message=="reset") reset(); } }
-
Pyramid Scripts
These scripts are for the Pyramid shape. To use these scripts place the control script in the root prim. Then place the slave script in the prim that will be changing shape.
Control Script:
// this script is placed in the main control prim for a pyramid
key id; float heightSize; float lengthSize; float widthSize; float volumeSize; default { touch_start(integer total_number) { id = llDetectedKey(0); llMessageLinked(LINK_ALL_CHILDREN,0,"Pyramid",id); } link_message(integer sender_number, integer number, string message, key id) { heightSize=(float)message; state width; } } state width { link_message(integer sender_number, integer number, string message, key id) { widthSize=(float)message; state length; } } state length { link_message(integer sender_number, integer number, string message, key id) { lengthSize=(float)message; state display; } } state display { state_entry() { volumeSize=(1.0/3.0)*widthSize*lengthSize*heightSize; llInstantMessage(id,"Volume is: "+(string)volumeSize +"\n Height is: "+(string)heightSize +"\n Length is: "+(string)lengthSize +"\n Width is: "+(string)widthSize); llSetText("Volume is: "+(string)volumeSize +"\n Height is: "+(string)heightSize +"\n Length is: "+(string)lengthSize +"\n Width is: "+(string)widthSize, <1.0,>, 1.0); llMessageLinked(LINK_ALL_CHILDREN,0,"reset",id); llResetScript(); } }
Slave Script:
//place in the prim you want to change shape for a pyramid
//global variables float lengthSize; float widthSize; float heightSize; float volumeSize; integer channel; integer shape; integer phantom=FALSE;//Select TRUE for Phantom prim FALSE for normal. vector top_size=<1.0,1.0,0.0>; vector startSize=<2.0,2.0,2.0>;//starting size of prim string usermessage; key id2; //dialog list items list listc= [".2", ".4", ".6", ".8", "1", "1.2", "1.4", "1.6", "1.8","2"]; list liste=["Yes","No"]; string menuLength="Please Enter Length:"; string menuWidth="Please Enter Width:"; string menuHeight="Please Enter Height:"; string menurestart="Would You Like To Continue"; //=========================================== //user defined functions primsize() { float z= heightSize; float x= lengthSize; float y= widthSize; llSetScale(); } primshape() { llSetPrimitiveParams([ PRIM_PHANTOM,phantom, PRIM_TYPE,shape, PRIM_HOLE_DEFAULT, <0.0,1.0,0.0>, 0.0, ZERO_VECTOR, top_size, ZERO_VECTOR]); } pyramidvolume() { volumeSize=(1.0/3.0)*widthSize*lengthSize*heightSize; } reset() { llSleep(2.0); llResetScript(); } //========================================= //Script states default { state_entry() { channel=(integer)llFrand(1000.0); llListen(channel,"", id2,""); } link_message(integer sender_number, integer number, string message, key id) { id2=id; usermessage=message; if (message=="Pyramid") { shape=PRIM_TYPE_BOX; top_size=ZERO_VECTOR; primshape(); state Height; } else if (message=="Cube") { llResetScript(); } else if (message=="Cone") { llResetScript(); } else if (message=="Cylinder") { llResetScript(); } } } //state to get height state Height { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuHeight, listc,channel); } listen(integer channel, string name, key id, string message) { heightSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)heightSize,""); if (usermessage=="Cube"||usermessage=="Pyramid") { state width; } else if (usermessage=="Cylinder"||usermessage=="Cone") { llResetScript(); } } } //state to get width state width { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuWidth, listc,channel); } listen(integer channel, string name, key id, string message) { widthSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)widthSize,""); state length; } } //state to get length state length { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuLength, listc,channel); } listen(integer channel, string name, key id, string message) { lengthSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)lengthSize,""); llOwnerSay("Length"+message); if (usermessage=="Pyramid") { pyramidvolume(); state display; } else if (usermessage=="Cube") { llResetScript(); state display; } else if (usermessage=="Cylinder") { llResetScript(); state display; } else if (usermessage=="Cone") { llResetScript(); state display; } } } //state for display size state display { state_entry() { llMessageLinked(LINK_ALL_CHILDREN,0,"start",""); llSleep(4.0); primsize(); } link_message(integer sender_number, integer number, string message, key id) { if (message=="reset") reset(); } } //Script End:
-
Cylinder Scripts
These scripts are for the Cylinder shape. To use these scripts place the control script in the root prim. Then place the slave script in the prim that will be changing shape.
Control Script:
// this script is placed in the main control prim for a cylinder key id; float heightSize; float radiusSize; float volumeSize; default { touch_start(integer total_number) { id = llDetectedKey(0); llMessageLinked(LINK_ALL_CHILDREN,0,"Cylinder",id); } link_message(integer sender_number, integer number, string message, key id) { heightSize=(float)message; state radius; } } state radius { link_message(integer sender_number, integer number, string message, key id) { radiusSize=(float)message; state display; } } state display { state_entry() { volumeSize=PI*(radiusSize*radiusSize)*heightSize; llInstantMessage(id,"Volume is: "+(string)volumeSize +"\n Height is: "+(string)heightSize +"\n Radius is: "+(string)radiusSize); llSetText("Volume is: "+(string)volumeSize +"\n Height is: "+(string)heightSize +"\n Radius is: "+(string)radiusSize, <1.0,>, 1.0); llMessageLinked(LINK_ALL_CHILDREN,0,"reset",id); llResetScript(); } }
Slave Script:
//place in the prim you want to change shape for a cylinder //global variables float lengthSize; float widthSize; float heightSize; float radiusSize; float volumeSize; integer channel; integer shape; integer phantom=FALSE;//Select TRUE for Phantom prim FALSE for normal. vector top_size=<1.0,1.0,0.0>; vector startSize=<2.0,2.0,2.0>;//starting size of prim string usermessage; key id2; //dialog list items list listc= [".2", ".4", ".6", ".8", "1", "1.2", "1.4", "1.6", "1.8","2"]; list listd= ["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"]; list liste=["Yes","No"]; string menuHeight="Please Enter Height:"; string menuRadius="Please Enter Radius:"; string menurestart="Would You Like To Continue"; //========================================= //user defined functions primsize() { float z= heightSize; float x= lengthSize; float y= widthSize; llSetScale(); } primshape() { llSetPrimitiveParams([ PRIM_PHANTOM,phantom, PRIM_TYPE,shape, PRIM_HOLE_DEFAULT, <0.0,1.0,0.0>, 0.0, ZERO_VECTOR, top_size, ZERO_VECTOR]); } cylindervolume() { volumeSize=PI*(radiusSize*radiusSize)*heightSize; } reset() { llResetScript(); } //======================================= //Script states default { state_entry() { channel=(integer)llFrand(1000.0); llListen(channel,"", id2,""); } link_message(integer sender_number, integer number, string message, key id) { id2=id; usermessage=message; if (message=="Square") { llResetScript(); } else if (message=="Pyramid") { llResetScript(); } else if (message=="Cone") { llResetScript(); } else if (message=="Cylinder") { shape=PRIM_TYPE_CYLINDER;
primshape(); state Height; } } } //state to get height state Height { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuHeight, listc,channel); } listen(integer channel, string name, key id, string message) { heightSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)heightSize,""); if (usermessage=="Square"||usermessage=="Pyramid") { llResetScript(); } else if (usermessage=="Cylinder"||usermessage=="Cone") { state radiusState; } } } //state to get radius state radiusState { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuRadius, listd,channel); } listen(integer channel, string name, key id, string message) { radiusSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)radiusSize,""); lengthSize=radiusSize*2; widthSize=lengthSize; llOwnerSay("Length"+message); if (usermessage=="Cone") { llResetScript(); } else if (usermessage=="Square") { llResetScript(); } else if (usermessage=="Pyramid") { llResetScript(); } else if (usermessage=="Cylinder") { cylindervolume(); state display; } } } //state for display size state display { state_entry() { llMessageLinked(LINK_ALL_CHILDREN,0,"start",""); llSleep(4.0); primsize(); } link_message(integer sender_number, integer number, string message, key id) { if (message=="reset") reset(); } }
-
Cube Scripts
These scripts are for the Cube shape. To use these scripts place the control script in the root prim. Then place the slave script in the prim that will be changing shape.
Control Script:
// this script is placed in the main control prim for a cube
key id; float heightSize; float lengthSize; float widthSize; float volumeSize; default { touch_start(integer total_number) { id = llDetectedKey(0); llMessageLinked(LINK_ALL_CHILDREN,0,"Cube",id); } link_message(integer sender_number, integer number, string message, key id) { heightSize=(float)message; state width; } } state width { link_message(integer sender_number, integer number, string message, key id) { widthSize=(float)message; state length; } } state length { link_message(integer sender_number, integer number, string message, key id) { lengthSize=(float)message; state display; } } state display { state_entry() { volumeSize=lengthSize*widthSize*heightSize; llInstantMessage(id,"Volume is: "+(string)volumeSize +"\n Height is: "+(string)heightSize +"\n Length is: "+(string)lengthSize +"\n Width is: "+(string)widthSize); llSetText("Volume is: "+(string)volumeSize +"\n Height is: "+(string)heightSize +"\n Length is: "+(string)lengthSize +"\n Width is: "+(string)widthSize, <0.0,>, 1.0); llMessageLinked(LINK_ALL_CHILDREN,0,"reset",id); llResetScript(); } }
Slave Script:
//place in the prim you want to change shape for a cube //global variables float lengthSize; float widthSize; float heightSize; float volumeSize; integer channel; integer shape; integer phantom=FALSE;//Select TRUE for Phantom prim FALSE for normal. vector top_size=<1.0,1.0,0.0>; vector startSize=<2.0,2.0,2.0>;//starting size of prim string usermessage; key id2; //dialog list items list listc= [".2", ".4", ".6", ".8", "1", "1.2", "1.4", "1.6", "1.8","2"]; list liste=["Yes","No"]; string menuLength="Please Enter Length:"; string menuWidth="Please Enter Width:"; string menuHeight="Please Enter Height:"; string menurestart="Would You Like To Continue"; //=================================================== //user defined functions primsize() { float z= heightSize; float x= lengthSize; float y= widthSize; llSetScale(); } primshape() { llSetPrimitiveParams([ PRIM_PHANTOM,phantom, PRIM_TYPE,shape, PRIM_HOLE_DEFAULT, <0.0,1.0,0.0>, 0.0, ZERO_VECTOR, top_size, ZERO_VECTOR]); } Cubevolume() { volumeSize=lengthSize*widthSize*heightSize; } reset() { llSleep(2.0); llResetScript(); }
//================================================== //Script states default { state_entry() { channel=(integer)llFrand(1000.0); llListen(channel,"", id2,""); } link_message(integer sender_number, integer number, string message, key id) { id2=id; usermessage=message; if (message=="Cube") { shape=PRIM_TYPE_BOX; primshape(); state Height; } else if (message=="Pyramid") { llResetScript(); } else if (message=="Cone") { llResetScript(); } else if (message=="Cylinder") { llResetScript(); } } } //state to get height state Height { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuHeight, listc,channel); } listen(integer channel, string name, key id, string message) { heightSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)heightSize,""); if (usermessage=="Cube"||usermessage=="Pyramid") { state width; } else if (usermessage=="Cylinder"||usermessage=="Cone") { llResetScript(); } } } //state to get width state width { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuWidth, listc,channel); } listen(integer channel, string name, key id, string message) { widthSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)widthSize,""); state length; } } //state to get length state length { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuLength, listc,channel); } listen(integer channel, string name, key id, string message) { lengthSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)lengthSize,""); llOwnerSay("Length"+message); if (usermessage=="Cube") { Cubevolume(); state display; } else if (usermessage=="Pyramid") { llResetScript(); state display; } else if (usermessage=="Cylinder") { llResetScript(); state display; } else if (usermessage=="Cone") { llResetScript(); state display; } } } //state for display size state display { state_entry() { llMessageLinked(LINK_ALL_CHILDREN,0,"start",""); llSleep(4.0); primsize(); } link_message(integer sender_number, integer number, string message, key id) { if (message=="reset") reset(); } } //Script End:
-
Cone Scripts
These scripts are for the cone shape. To use these scripts place the control script in the root prim. Then place the slave script in the prim that will be changing shape.
Control Script:
// copy from here down // this script is placed in the main control prim for a cone key id; float heightSize; float radiusSize; float volumeSize; default { touch_start(integer total_number) { id = llDetectedKey(0); llMessageLinked(LINK_ALL_CHILDREN,0,"Cone",id); } link_message(integer sender_number, integer number, string message, key id) { heightSize=(float)message; state radius; } } state radius { link_message(integer sender_number, integer number, string message, key id) { radiusSize=(float)message; state display; } } state display { state_entry() { volumeSize=(1.0/3.0)*PI*(radiusSize*radiusSize)*heightSize; llInstantMessage(id,"Volume is: "+(string)volumeSize +"\n Height is: "+(string)heightSize +"\n Radius is: "+(string)radiusSize); llSetText("Volume is: "+(string)volumeSize +"\n Height is: "+(string)heightSize +"\n Radius is: "+(string)radiusSize, <0.0,>, 1.0); llMessageLinked(LINK_ALL_CHILDREN,0,"reset",id); llResetScript(); } } //End of first script
Slave Script:
//copy from here down //place in the prim you want to change shape for a cone //global variables float lengthSize; float widthSize; float heightSize; float radiusSize; float volumeSize; integer channel; integer shape; integer phantom=FALSE;//Select TRUE for Phantom prim FALSE for normal. vector top_size=<1.0,1.0,0.0>; vector startSize=<2.0,2.0,2.0>;//starting size of prim string usermessage; key id2; //dialog list items list listc= [".2", ".4", ".6", ".8", "1", "1.2", "1.4", "1.6", "1.8","2"]; list listd= ["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"]; list liste=["Yes","No"]; string menuHeight="Please Enter Height:"; string menuRadius="Please Enter Radius:"; string menurestart="Would You Like To Continue"; //==================================== //user defined functions primsize() { float z= heightSize; float x= lengthSize; float y= widthSize; llSetScale(); } primshape() { llSetPrimitiveParams([ PRIM_PHANTOM,phantom, PRIM_TYPE,shape, PRIM_HOLE_DEFAULT, <0.0,1.0,0.0>, 0.0, ZERO_VECTOR, top_size, ZERO_VECTOR]); } conevolume() { volumeSize=(1.0/3.0)*PI*(radiusSize*radiusSize)*heightSize; } reset() { llSleep(2.0); llResetScript(); } //========================================== //Script states default { state_entry() { channel=(integer)llFrand(1000.0); llListen(channel,"", id2,""); } link_message(integer sender_number, integer number, string message, key id) { id2=id; usermessage=message; if (message=="Square") { llResetScript(); } else if (message=="Pyramid") { llResetScript(); } else if (message=="Cylinder") { llResetScript(); } else if (message=="Cone") { shape=PRIM_TYPE_CYLINDER; top_size=ZERO_VECTOR; primshape(); state Height; } } } //state to get height state Height { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuHeight, listc,channel); } listen(integer channel, string name, key id, string message) { heightSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)heightSize,""); if (usermessage=="Square"||usermessage=="Pyramid") { llResetScript(); } else if (usermessage=="Cylinder"||usermessage=="Cone") { state radiusState; } } } //state to get radius state radiusState { state_entry() { llListen(channel,"", id2,""); llDialog(id2, menuRadius, listd,channel); } listen(integer channel, string name, key id, string message) { radiusSize=(float)message; llMessageLinked(LINK_ROOT,0,(string)radiusSize,""); lengthSize=radiusSize*2; widthSize=lengthSize; llOwnerSay("Length"+message); if (usermessage=="Cylinder") { llResetScript(); } else if (usermessage=="Square") { llResetScript(); } else if (usermessage=="Pyramid") { llResetScript(); } else if (usermessage=="Cone") { conevolume(); state display; } } } //state for display size state display { state_entry() { llMessageLinked(LINK_ALL_CHILDREN,0,"start",""); llSleep(4.0); primsize(); } link_message(integer sender_number, integer number, string message, key id) { if (message=="reset") reset(); } } //end of script

|