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