1
0

KanEd-Test08.lsl 650 B

1234567891011121314151617181920212223
  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. touch_start(integer total_number)
  9. {
  10. vector start_color = llGetColor( ALL_SIDES ); // save current color.
  11. llSetColor( < 1.0, 0.0, 0.0 > , ALL_SIDES ); // set color to red.
  12. float objMass = llGetMass();
  13. float Z_force = 20.0 * objMass;
  14. llApplyImpulse( < 0.0, 0.0, Z_force >, FALSE );
  15. llSay( 0, "Impulse of " + (string)Z_force + " applied." );
  16. llSetColor( start_color , ALL_SIDES ); // set color to green.
  17. }
  18. }