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-Test05.lsl | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 bin/assets/ScriptsAssetSet/KanEd-Test05.lsl (limited to 'bin/assets/ScriptsAssetSet/KanEd-Test05.lsl') 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" ); + } +} + -- cgit v1.1