diff options
Diffstat (limited to '')
-rw-r--r-- | bin/assets/ScriptsAssetSet/KanEd-Test08.lsl | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ | |||
1 | default | ||
2 | { | ||
3 | state_entry() | ||
4 | { | ||
5 | llSay( 0, "Hello, Avatar! Touch to launch me straight up."); | ||
6 | llSetStatus( 1, TRUE ); // turn on physics. | ||
7 | } | ||
8 | |||
9 | touch_start(integer total_number) | ||
10 | { | ||
11 | vector start_color = llGetColor( ALL_SIDES ); // save current color. | ||
12 | llSetColor( < 1.0, 0.0, 0.0 > , ALL_SIDES ); // set color to red. | ||
13 | |||
14 | float objMass = llGetMass(); | ||
15 | float Z_force = 20.0 * objMass; | ||
16 | |||
17 | llApplyImpulse( < 0.0, 0.0, Z_force >, FALSE ); | ||
18 | |||
19 | llSay( 0, "Impulse of " + (string)Z_force + " applied." ); | ||
20 | llSetColor( start_color , ALL_SIDES ); // set color to green. | ||
21 | } | ||
22 | } | ||
23 | |||