Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. //===== Wobbley Prim Script ================================
  2.  
  3. vector size;
  4. float freq = 2;
  5. float amplitude = 0.25;
  6. float decay = 1.25;
  7. float duration = 4.0;
  8. float time;
  9.  
  10. wobble()
  11. {
  12. llResetTime();
  13. do
  14. {
  15. time = llGetTime();
  16. float lala = amplitude*llCos(freq*time*2*PI)/llPow(2.718, decay*time);
  17. llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_SIZE,<size.x-lala,size.y-lala,size.z+lala>]);
  18. llSleep(time/40);
  19. }
  20. while (llGetTime() < duration);
  21. llSetScale(size);
  22. }
  23.  
  24. default
  25. {
  26. state_entry()
  27. {
  28. size = llGetScale();
  29. llSetTimerEvent(llFrand(1.0) + 2.5);
  30. wobble();
  31. }
  32.  
  33. timer()
  34. {
  35. wobble();
  36. }
  37. }
  38. //Pavl Duke 2014
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement