Advertisement
salahzar

script molla

May 13th, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. vector save;
  3.  
  4. integer N=10;
  5. float FACTOR=0.2;
  6. float DIVIDE=2;
  7. vector SIZE=<0.5,0.5,0.5>;
  8. float SLEEP=0.05;
  9.  
  10. integer i;
  11. float x;
  12.  
  13. stretch()
  14. {
  15.     for(i=1;i<N;i++)
  16.     {
  17.         x=i*FACTOR;
  18.         llSetLinkPrimitiveParamsFast(0,[ PRIM_SIZE, SIZE+<0,0,x>, PRIM_POSITION, save+<0,0,x/DIVIDE>]);
  19.         llSleep(SLEEP);
  20.     }
  21. }
  22. shrink()
  23. {
  24.     for(i=N;i>1;i--)
  25.     {
  26.         x=i*FACTOR;
  27.         llSetLinkPrimitiveParamsFast(0,[ PRIM_SIZE, SIZE+<0,0,x>, PRIM_POSITION, save+<0,0,x/DIVIDE>]);
  28.         llSleep(SLEEP);
  29.     }
  30. }
  31.  
  32.  
  33. default
  34. {
  35.     state_entry()
  36.     {
  37.        
  38.         save=llGetPos();
  39.         llSetTimerEvent(N*SLEEP*2);
  40.     }
  41.    
  42.     timer()
  43.     {
  44.         stretch();
  45.         shrink();
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement