From fb8faa8336ddb795ccd6840259b06a2608350a57 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 12 Jan 2009 18:00:46 +0000
Subject: * Apply http://opensimulator.org/mantis/view.php?id=2913 * Add the
KanEd scripts to the standard library * Thanks Fly-Man-
---
bin/assets/ScriptsAssetSet/KanEd-Test01.lsl | 13 +++
bin/assets/ScriptsAssetSet/KanEd-Test02.lsl | 31 +++++++
bin/assets/ScriptsAssetSet/KanEd-Test03.lsl | 49 ++++++++++
bin/assets/ScriptsAssetSet/KanEd-Test04.lsl | 51 +++++++++++
bin/assets/ScriptsAssetSet/KanEd-Test05.lsl | 30 +++++++
bin/assets/ScriptsAssetSet/KanEd-Test06.lsl | 8 ++
bin/assets/ScriptsAssetSet/KanEd-Test07.lsl | 38 ++++++++
bin/assets/ScriptsAssetSet/KanEd-Test08.lsl | 23 +++++
bin/assets/ScriptsAssetSet/KanEd-Test09.lsl | 71 +++++++++++++++
bin/assets/ScriptsAssetSet/KanEd-Test10.lsl | 57 ++++++++++++
bin/assets/ScriptsAssetSet/KanEd-Test11.lsl | 52 +++++++++++
bin/assets/ScriptsAssetSet/KanEd-Test12.lsl | 46 ++++++++++
bin/assets/ScriptsAssetSet/KanEd-Test13.lsl | 16 ++++
bin/assets/ScriptsAssetSet/KanEd-Test14.lsl | 70 +++++++++++++++
bin/assets/ScriptsAssetSet/KanEd-Test15.lsl | 10 +++
bin/assets/ScriptsAssetSet/KanEd-Test16.lsl | 66 ++++++++++++++
bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml | 118 ++++++++++++++++++++++++-
17 files changed, 747 insertions(+), 2 deletions(-)
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test01.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test02.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test03.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test04.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test05.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test06.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test07.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test08.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test09.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test10.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test11.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test12.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test13.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test14.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test15.lsl
create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test16.lsl
(limited to 'bin/assets')
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test01.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test01.lsl
new file mode 100644
index 0000000..5f8a0aa
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test01.lsl
@@ -0,0 +1,13 @@
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar!");
+ }
+
+ touch_start(integer total_number)
+ {
+ llSay( 0, "Touched.");
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl
new file mode 100644
index 0000000..2506d95
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl
@@ -0,0 +1,31 @@
+integer counter;
+
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar! Touch to change color and size.");
+ counter = 0;
+ }
+
+ touch_start(integer total_number)
+ { // do these instructions when the object is touched.
+ counter = counter + 1;
+
+ // choose three random RGB color components between 0. and 1.0.
+ float redness = llFrand( 1.0 );
+ float greenness = llFrand( 1.0 );
+ float blueness = llFrand( 1.0 );
+
+ // combine color components into a vector and use that vector
+ // to set object color.
+ vector prim_color = < redness, greenness, blueness >;
+ llSetColor( prim_color, ALL_SIDES ); // set object color to new color.
+
+ // choose a random number between 0. and 10. for use as a scale factor.
+ float new_scale = llFrand(10.0) + 1.0;
+ llSetScale(< new_scale, new_scale, new_scale > ); // set object scale.
+ llSay( 0, "Touched by angel number " + (string)counter);
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test03.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test03.lsl
new file mode 100644
index 0000000..f371ee9
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test03.lsl
@@ -0,0 +1,49 @@
+integer counter;
+integer second;
+
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar! Touch to change color and size.");
+ counter = 0;
+ }
+
+ touch_start(integer total_number)
+ {
+ counter = counter + 1;
+
+ llSay( 0, "Touched by angel number " + (string)counter);
+
+ llSetTimerEvent( 2 ); // create a "timer event" every 2 seconds.
+ }
+
+ timer() // do these instructions every time the timer event occurs.
+ {
+ second++;
+
+ // choose three random RGB color components between 0. and 1.0.
+ float red = llFrand( 1.0 );
+ float green = llFrand( 1.0 );
+ float blue = llFrand( 1.0 );
+
+ // combine color components into a vector and use that vector
+ // to set object color.
+ vector prim_color = < red, green, blue >;
+ llSetColor( prim_color, ALL_SIDES ); // set object color to new color.
+
+ // a choose random number between 0. and 10 for use as a scale factor.
+ float new_scale = llFrand( 10.0 );
+ llSetScale(< new_scale, new_scale, new_scale > ); // set object scale.
+
+ if ( second > 19 ) // then time to wrap this up.
+ {
+ // turn object black, print "resting" message, and reset object....
+ llSetColor( < 0, 0, 0 >, ALL_SIDES );
+
+ llSay( 0, "Object now resting and resetting script." );
+ llResetScript(); // return object to ready state.
+ }
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test04.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test04.lsl
new file mode 100644
index 0000000..5aa25af
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test04.lsl
@@ -0,0 +1,51 @@
+integer counter;
+integer second;
+vector startPosition;
+
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar! Touch to change position.");
+ counter = 0;
+ startPosition = llGetPos();
+ }
+
+ touch_start(integer total_number)
+ {
+ counter = counter + 1;
+
+ llSay( 0, "Touched by angel number " + (string)counter);
+
+ llSetTimerEvent( 1 ); // arrange for a "timer event" every second.
+ }
+
+ timer() // do these instructions every time the timer event occurs.
+ {
+ second++;
+
+ // choose three random distances between 0. and 10.0.
+ float X_distance = llFrand( 10.0 );
+ float Y_distance = llFrand( 10.0 );
+ float Z_distance = llFrand( 10.0 );
+
+ // combine these distance components into a vector and use it
+ // to increment the starting position and reposition the object.
+ vector increment = < X_distance, Y_distance, Z_distance >;
+ vector newPosition = startPosition + increment;
+ llSetPos( newPosition ); // reposition object.
+
+ if ( second > 19 ) // then time to wrap this up.
+ {
+ // move object back to starting position...
+ while ( llVecDist( llGetPos(), startPosition ) > 0.001)
+ {
+ llSetPos( startPosition );
+ }
+
+ llSay( 0, "Object now resting and resetting script." );
+ llResetScript(); // return object to ready state.
+ }
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test05.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test05.lsl
new file mode 100644
index 0000000..86727cf
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test05.lsl
@@ -0,0 +1,30 @@
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar!");
+ vector startPoint = llGetPos();
+ }
+
+ touch_start(integer total_number)
+ {
+ llSay( 0, "Touched." );
+
+ // Define a rotation of 10 degrees around the Y-axis.
+ rotation Y_10 = llEuler2Rot( < 0, 10 * DEG_TO_RAD, 0 > );
+
+ // now rotate the object 10 degrees in the X-Z plane during
+ // each loop iteration. note that each call to llSetRot
+ // causes a .2 second delay.
+ integer i;
+ for( i = 1; i < 100; i++ )
+ {
+ // rotate object in the X-Z plane around its own Y-axis.
+ rotation newRotation = llGetRot() * Y_10;
+
+ llSetRot( newRotation );
+ }
+ llSay( 0, "Rotation stopped" );
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test06.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test06.lsl
new file mode 100644
index 0000000..158d676
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test06.lsl
@@ -0,0 +1,8 @@
+default
+{
+ state_entry()
+ {
+ llTargetOmega( < 0, 1, 1 >, .2 * PI, 1.0 );
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test07.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test07.lsl
new file mode 100644
index 0000000..a1258f9
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test07.lsl
@@ -0,0 +1,38 @@
+vector rotationCenter;
+
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar!");
+ vector startPoint = llGetPos();
+ rotationCenter = startPoint + < 3, 3, 3 >;
+ // distance to the point of rotation should probably be a
+ // function of the max dimension of the object.
+ }
+
+ touch_start(integer total_number)
+ {
+ llSay( 0, "Touched." );
+
+ // Define a "rotation" of 10 degrees around the z-axis.
+ rotation Z_15 = llEuler2Rot( < 0, 0, 15 * DEG_TO_RAD > );
+
+ integer i;
+ for( i = 1; i < 100; i++ ) // limit simulation time in case of
+ { // unexpected behavior.
+ vector currentPosition = llGetPos();
+
+ vector currentOffset = currentPosition - rotationCenter;
+
+ // rotate the offset vector in the X-Y plane around the
+ // distant point of rotation.
+ vector rotatedOffset = currentOffset * Z_15;
+ vector newPosition = rotationCenter + rotatedOffset;
+
+ llSetPos( newPosition );
+ }
+ llSay( 0, "Orbiting stopped" );
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test08.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test08.lsl
new file mode 100644
index 0000000..d29428c
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test08.lsl
@@ -0,0 +1,23 @@
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar! Touch to launch me straight up.");
+ llSetStatus( 1, TRUE ); // turn on physics.
+ }
+
+ touch_start(integer total_number)
+ {
+ vector start_color = llGetColor( ALL_SIDES ); // save current color.
+ llSetColor( < 1.0, 0.0, 0.0 > , ALL_SIDES ); // set color to red.
+
+ float objMass = llGetMass();
+ float Z_force = 20.0 * objMass;
+
+ llApplyImpulse( < 0.0, 0.0, Z_force >, FALSE );
+
+ llSay( 0, "Impulse of " + (string)Z_force + " applied." );
+ llSetColor( start_color , ALL_SIDES ); // set color to green.
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test09.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test09.lsl
new file mode 100644
index 0000000..095f942
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test09.lsl
@@ -0,0 +1,71 @@
+vector startPos;
+vector curPos;
+vector curForce;
+integer second;
+
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar! Touch to launch me straight up.");
+ llSetStatus( 1, TRUE );
+ startPos = < 0, 0, 0 >;
+ }
+
+ touch_start(integer total_number)
+ {
+ startPos = llGetPos();
+ curPos = startPos;
+ curForce = < 0, 0, 0 >;
+ second = 0;
+
+ llSetColor( < 1.0, 0.0, 0.0 > , ALL_SIDES ); // set color to red.
+
+ float objMass = llGetMass();
+ float Z_force = 10.2 * objMass;
+
+ llSetForce( < 0.0, 0.0, Z_force >, FALSE );
+
+ llSay( 0, "Force of " + (string)Z_force + " being applied." );
+ llSetTimerEvent(1);
+ }
+
+ timer()
+ {
+ second++;
+ curPos = llGetPos();
+ float curDisplacement = llVecMag( curPos - startPos );
+
+ if( ( curDisplacement > 30. ) && // then object is too far away, and
+ ( llGetForce() != < 0.0, 0.0, 0.0 > ) ) // force not already zero,
+ { // then let gravity take over, and change color to green.
+ llSetForce( < 0.0, 0.0, 0.0 >, FALSE );
+ llSetColor( < 0, 1.0, 0 >, ALL_SIDES );
+ llSay( 0, "Force removed; object in free flight." );
+ }
+
+ if ( second > 19 ) // then time to wrap this up.
+ {
+ // turn object blue and zero force to be safe....
+ llSetColor( < 0, 0, 1.0 >, ALL_SIDES ); // change color to blue.
+ llSetForce( < 0, 0, 0 >, FALSE );
+
+ // ...move object back to starting position...
+ // ...after saving current status of Physics attribute.
+ integer savedStatus = llGetStatus( 1 );
+ llSetStatus( 1, FALSE ); // turn physics off.
+ while ( llVecDist( llGetPos(), startPos ) > 0.001)
+ {
+ llSetPos( startPos );
+ }
+ llSetStatus( 1, savedStatus ); // restore Physics status.
+
+ //...and then turn color to black and Reset the script.
+ llSetColor( < 1, 1, 1 >, ALL_SIDES );
+ llSetTimerEvent( 0 ); // turn off timer events.
+ llSay( 0, "Done and resetting script." );
+ llResetScript(); // return object to ready state.
+ }
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test10.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test10.lsl
new file mode 100644
index 0000000..de16df7
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test10.lsl
@@ -0,0 +1,57 @@
+vector startPosition;
+float groundLevel;
+
+default
+{
+ state_entry()
+ {
+ llListen( 0, "", llGetOwner(), "");
+
+ startPosition = llGetPos();
+ groundLevel = llGround( startPosition );
+
+ llSay( 0, "Control this object with chat commands like:" );
+ llSay( 0, "'up' or 'down' followed by a distance." );
+ }
+
+ listen( integer channel, string name, key id, string message )
+ {
+ // separate the input into blank-delmited tokens.
+ list parsed = llParseString2List( message, [ " " ], [] );
+
+ // get the first part--the "command".
+ string command = llList2String( parsed, 0 );
+
+ // get the second part--the "distance".
+ string distance_string = llList2String( parsed, 1 );
+ float distance = ( float )distance_string;
+
+ vector position = llGetPos();
+
+ if( command == "up" )
+ {
+ if( ( position.z + distance ) < (startPosition.z + 10.0 ) )
+ {
+ llSetPos( llGetPos() + < 0, 0, distance > ); // move up
+ llSetText( "Went up " + (string)distance, < 1, 0, 0 >, 1 );
+ }
+ else
+ {
+ llSetText( "Can't go so high.", < 1, 0, 0 >, 1 );
+ }
+ }
+ else if( command == "down" )
+ {
+ if( ( position.z - distance ) > groundLevel )
+ {
+ llSetPos( llGetPos() + < 0, 0, -distance > ); // move down
+ llSetText( "Went down " + (string)distance, < 1, 0, 0 >, 1 );
+ }
+ else
+ {
+ llSetText( "Can't go so low.", < 1, 0, 0 >, 1 );
+ }
+ }
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test11.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test11.lsl
new file mode 100644
index 0000000..e4b4048
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test11.lsl
@@ -0,0 +1,52 @@
+integer dialog_channel= 427; // set a dialog channel
+list menu = [ "Go up", "Go down" ];
+vector startPosition;
+float groundLevel;
+
+default
+{
+ state_entry()
+ {
+ // arrange to listen for dialog answers (from multiple users)
+ llListen( dialog_channel, "", NULL_KEY, "");
+
+ startPosition = llGetPos();
+ groundLevel = llGround( startPosition );
+ }
+
+ touch_start(integer total_number)
+ {
+ llDialog( llDetectedKey( 0 ), "What do you want to do?", menu,
+ dialog_channel );
+ }
+
+ listen(integer channel, string name, key id, string choice )
+ {
+ vector position = llGetPos();
+
+ // if a valid choice was made, implement that choice if possible.
+ // (llListFindList returns -1 if choice is not in the menu list.)
+ if ( llListFindList( menu, [ choice ]) != -1 )
+ {
+ if ( choice == "Go up" )
+ {
+ if( position.z < ( startPosition.z + 10.0 ) )
+ {
+ llSetPos( llGetPos() + < 0, 0, 1.0 > ); // move up
+ }
+ }
+ else if( choice == "Go down" )
+ {
+ if( position.z > ( groundLevel + 1.0 ) )
+ {
+ llSetPos( llGetPos() + < 0, 0, -1.0 > ); // move down
+ }
+ }
+ }
+ else
+ {
+ llSay( 0, "Invalid choice: " + choice );
+ }
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test12.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test12.lsl
new file mode 100644
index 0000000..eaa885b
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test12.lsl
@@ -0,0 +1,46 @@
+vector startPosition;
+float groundLevel;
+
+default
+{
+ state_entry()
+ {
+ // get permission to take over the avatar's control inputs.
+ llRequestPermissions( llGetOwner(), PERMISSION_TAKE_CONTROLS );
+
+ startPosition = llGetPos();
+ groundLevel = llGround( startPosition );
+ }
+
+ run_time_permissions( integer perm ) // event for processing
+ // permission dialog.
+ {
+ if ( perm & PERMISSION_TAKE_CONTROLS ) // permission has been given.
+ {
+ // go ahead and take over the forward and backward controls.
+ llTakeControls( CONTROL_FWD | CONTROL_BACK, TRUE, FALSE );
+ }
+ }
+
+ control( key id, integer held, integer change ) // event for processing
+ // key press.
+ {
+ vector position = llGetPos();
+
+ if ( change & held & CONTROL_FWD )
+ { // the "move forward" control has been activated.
+ if( position.z < (startPosition.z + 10.0) )
+ {
+ llSetPos( llGetPos() + < 0, 0, 1.0 >); // move up
+ }
+ }
+ else if ( change & held & CONTROL_BACK )
+ { // the "move backward" key has been activated.
+ if( position.z > groundLevel + 1.0 )
+ {
+ llSetPos( llGetPos() + < 0, 0, -1.0 >); // move down
+ }
+ }
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test13.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test13.lsl
new file mode 100644
index 0000000..7238a9b
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test13.lsl
@@ -0,0 +1,16 @@
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar!");
+ }
+
+ touch_start(integer total_number)
+ {
+ llSay( 0, "Touched.");
+
+ llRezObject("Object1", llGetPos() + < 0, 0, 2 >, ZERO_VECTOR,
+ ZERO_ROTATION, 42);
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test14.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test14.lsl
new file mode 100644
index 0000000..2c60035
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test14.lsl
@@ -0,0 +1,70 @@
+integer createdObjectCounter;
+integer linkedObjectCounter;
+
+default
+{
+ state_entry()
+ {
+ llSay( 0, "Hello, Avatar!");
+ linkedObjectCounter = 0; // zero the linked object counter.
+ }
+
+ touch_start(integer total_number)
+ {
+ if( createdObjectCounter <= 0 ) // nothing has yet been linked,
+ { // begin object creation sequence...
+ // ask for permissions now, since it will be too late later.
+ llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );
+ }
+ else // just do whatever should be done upon touch without
+ { // creating new objects to link.
+ // insert commands here to respond to a touch.
+ }
+ }
+
+ run_time_permissions( integer permissions_granted )
+ {
+ if( permissions_granted == PERMISSION_CHANGE_LINKS )
+ { // create 2 objects.
+ llRezObject("Object1", llGetPos() + < 1, 0, 2 >,
+ ZERO_VECTOR, ZERO_ROTATION, 42);
+ createdObjectCounter = createdObjectCounter + 1;
+
+ llRezObject("Object1", llGetPos() + < -1, 0, 2 >,
+ ZERO_VECTOR, ZERO_ROTATION, 42);
+ createdObjectCounter = createdObjectCounter + 1;
+
+ }
+ else
+ {
+ llOwnerSay( "Didn't get permission to change links." );
+ return;
+ }
+ }
+
+ object_rez( key child_id )
+ {
+ llOwnerSay( "rez happened and produced object with key " +
+ (string)child_id );
+
+ // link as parent to the just created child.
+ llCreateLink( child_id, TRUE );
+
+ // if all child objects have been created then the script can
+ // continue to work as a linked set of objects.
+ linkedObjectCounter++;
+ if( linkedObjectCounter >= 2 )
+ {
+ // Change all child objects in the set to red (including parent).
+ llSetLinkColor( LINK_ALL_CHILDREN, < 1, 0, 0 >, ALL_SIDES );
+
+ // Make child object "2" half-tranparent.
+ llSetLinkAlpha( 2, .5, ALL_SIDES );
+
+ // Insert commands here to manage subsequent activity of the
+ // linkset, like this command to rotate the result:
+ // llTargetOmega( < 0, 1, 1 >, .2 * PI, 1.0 );
+ }
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test15.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test15.lsl
new file mode 100644
index 0000000..425c9ee
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test15.lsl
@@ -0,0 +1,10 @@
+default
+{
+ state_entry()
+ {
+ llSetStatus(STATUS_PHANTOM,TRUE);
+ llSetTexture("lit_texture", ALL_SIDES);
+ llSetTextureAnim (ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0, 0, 15.0);
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test16.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test16.lsl
new file mode 100644
index 0000000..536ff19
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test16.lsl
@@ -0,0 +1,66 @@
+// This is a script designed to orbit its owner.
+vector startPos;
+vector curPos;
+
+vector offset; // offset from Agent
+integer iteration;
+float rotationRate; // degrees of rotation per iteration
+float sensorInterval; // seconds between sensor scan.
+
+default
+{
+ state_entry()
+ {
+ llOwnerSay( "Hello, Avatar! Touch to start orbiting." );
+ llSetStatus( 1, FALSE ); // turn Physics off.
+ offset = < 2, 2, 1 >;
+ iteration = 0;
+ rotationRate = .5;
+ sensorInterval = .3;
+ }
+
+ touch_start(integer total_number)
+ {
+ startPos = llGetPos();
+ curPos = startPos;
+
+ llSleep( .1 );
+
+ key id = llGetOwner();
+ llSensorRepeat( "", id, AGENT, 96, PI, sensorInterval );
+ }
+
+ sensor(integer total_number)
+ {
+ iteration++;
+
+ if( iteration > 300 )
+ {
+ llResetScript();
+ }
+
+ if( llDetectedOwner( 0 ) == llGetOwner() )
+ { // the detected Agent is my owner.
+ vector position = llDetectedPos(0); // find Owner position.
+
+ // calculate next object position relative both to the Owner's
+ // position and the current time interval counter. That is,
+ // use the iteration counter to define a rotation, multiply
+ // the rotation by the constant offset to get a rotated offset
+ // vector, and add that rotated offset to the current position
+ // to defne the new position.
+
+ float degreeRotation = llRound( rotationRate * iteration ) % 360;
+ rotation Rotation =
+ llEuler2Rot( < 0, 0, degreeRotation * DEG_TO_RAD > );
+ vector rotatedOffset = offset * Rotation;
+ position += rotatedOffset;
+
+ // change the location of the object and save the current (rotated)
+ // offset for use during the next iteration.
+ llSetPos( position );
+ offset = rotatedOffset;
+ }
+ }
+}
+
diff --git a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
index 6585f7d..c76cb78 100644
--- a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
+++ b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
@@ -125,5 +125,119 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit v1.1