Advertisement
salahzar

Cicloide 2 - Traslazione lungo asse y

May 4th, 2013
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. vector x0;
  2. rotation r0;
  3.  
  4. default
  5. {
  6.     state_entry()
  7.     {
  8.         x0=llGetPos();
  9.         r0=llGetRot();
  10.         llSay(0,"Marcatura posizione iniziale");
  11.         //llListen(100,"",NULL_KEY,"");
  12.     }
  13.     on_rez(integer rez)
  14.     {
  15.         llResetScript();
  16.     }
  17.    
  18.     touch_start(integer count)
  19.     {
  20.        
  21.             llMessageLinked(LINK_SET,100,"START",NULL_KEY);
  22.             float t;
  23.             for(t=0;t<22;t+=.1)
  24.             {
  25.                 llSetLinkPrimitiveParamsFast(1,[PRIM_POSITION, x0+<0,-t,0>]);
  26.                 llSleep(0.05);
  27.             }
  28.             llMessageLinked(LINK_SET,100,"STOP",NULL_KEY);
  29.             while(llVecDist(llGetPos(),x0)>1)
  30.                 llSetLinkPrimitiveParamsFast(1,[PRIM_POSITION,x0]);
  31.             llSetRot(r0);
  32.        
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement