aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/assets/ScriptsAssetSet/KanEd-Test05.lsl
blob: 86727cf1f32ef8285ce4bd2929c9254b74852c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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" );              
   }
}