Advertisement
Guest User

morphing prim

a guest
Jan 14th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer x;
  2. integer olda;
  3. vector oldb;
  4. float oldc;
  5. vector oldd;
  6. vector olde;
  7. vector oldf;
  8.  
  9. integer a;
  10. vector b;
  11. float c;
  12. vector d;
  13. vector e;
  14. vector f;
  15. default
  16. {
  17.     state_entry()
  18.     {
  19.         llSetTimerEvent(1);
  20.     }
  21.     timer()
  22.     {
  23.          integer type;
  24.         list toptions;
  25.         if (x==0)
  26.         {
  27.             olda=a;
  28.             oldb=b;
  29.             oldc=c;
  30.             oldd=d;
  31.             olde=e;
  32.             oldf=f;
  33.        // integer type=llFloor(llFrand(6));
  34.      
  35.         //hole type
  36.      
  37.             a=llFloor(llFrand(3)+1);
  38.             if(a==1)
  39.             {a=16;}
  40.             if (a==2)
  41.             {a=32;}
  42.             if(a==3)
  43.             {a=48;}
  44.             //path cut
  45.             b=<llFrand(1),llFrand(1),0>;
  46.             if (b.x>b.y)
  47.             {
  48.                 float btemp=b.x;
  49.                 b.x=b.y;
  50.                 b.y=btemp;
  51.             }
  52.             //hollow %
  53.            c= llFrand(1);
  54.            //twist
  55.             d=<llFrand(2)-1,llFrand(2)-1,0>;
  56.             //top size (Taper)
  57.             e=<llFrand(2),llFrand(2),0>;
  58.             //top shear
  59.             f=<llFrand(1),llFrand(1),0>;
  60.             x=x+1;
  61.         }
  62.         else
  63.         {
  64.              integer ta;
  65.             vector tb;
  66.             float tc;
  67.             vector td;
  68.             vector te;
  69.             vector tf;
  70.            // llOwnerSay("Old: "+(string)oldb);
  71.            // llOwnerSay("New: "+(string)b);
  72.             do
  73.             {
  74.                 if (x==5 && olda!=a)
  75.                 {
  76.                     ta=a;
  77.                 }
  78.            
  79.             tb=(((b-oldb)/10)*x)+oldb;
  80.             tc=(((c-oldc)/10)*x)+oldc;
  81.             td=(((d-oldd)/10)*x)+oldd;
  82.             te=(((e-olde)/10)*x)+olde;
  83.             tf=(((f-oldf)/10)*x)+oldf;
  84.            // llOwnerSay((string)tb);
  85.             llSleep(.1);
  86.             x=x+1;
  87.             toptions=[9,type,ta,tb,tc,td,te,tf];  
  88.             llSetLinkPrimitiveParamsFast(LINK_THIS,toptions);
  89.         }while(x<11);
  90.                 x=0;
  91.            
  92.         }
  93.             toptions=[9,type,a,b,c,d,e,f];  
  94.        // llSetLinkPrimitiveParamsFast(LINK_THIS,toptions);
  95.     }
  96.  
  97.    
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement