1
0

KanEd-Test05.lsl 785 B

123456789101112131415161718192021222324252627282930
  1. default
  2. {
  3. state_entry()
  4. {
  5. llSay( 0, "Hello, Avatar!");
  6. vector startPoint = llGetPos();
  7. }
  8. touch_start(integer total_number)
  9. {
  10. llSay( 0, "Touched." );
  11. // Define a rotation of 10 degrees around the Y-axis.
  12. rotation Y_10 = llEuler2Rot( < 0, 10 * DEG_TO_RAD, 0 > );
  13. // now rotate the object 10 degrees in the X-Z plane during
  14. // each loop iteration. note that each call to llSetRot
  15. // causes a .2 second delay.
  16. integer i;
  17. for( i = 1; i < 100; i++ )
  18. {
  19. // rotate object in the X-Z plane around its own Y-axis.
  20. rotation newRotation = llGetRot() * Y_10;
  21. llSetRot( newRotation );
  22. }
  23. llSay( 0, "Rotation stopped" );
  24. }
  25. }