Advertisement
giratina1999

Untitled

Jan 3rd, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. Second life script:
  2. float time = 0.01;
  3.  
  4. default
  5. {
  6. state_entry()
  7. {
  8. llSetLinkPrimitiveParams(LINK_SET,[PRIM_GLOW,ALL_SIDES,1.0]);
  9. llSetLinkAlpha(LINK_SET,0.0,ALL_SIDES);
  10. llSetTimerEvent(time);
  11.  
  12. }
  13.  
  14. on_rez(integer parameters)
  15. {
  16. llSetLinkPrimitiveParams(LINK_SET,[PRIM_GLOW,ALL_SIDES,1.0]);
  17. llSetLinkAlpha(LINK_SET,0.0,ALL_SIDES);
  18. llSetTimerEvent(time);
  19.  
  20. }
  21.  
  22.  
  23. timer()
  24. {
  25.  
  26. float alpha=llGetAlpha(0);
  27.  
  28. list params = llGetPrimitiveParams([PRIM_GLOW,0]);
  29. float glow = llList2Float(params, 0);
  30. //This next line you can uncomment to use for testing purposes to view the alpha and glow values during each step.
  31. //llOwnerSay("Glow = " + (string)glow + "Alpha = " + (string)alpha);
  32. llSetLinkPrimitiveParams(LINK_SET,[PRIM_GLOW,ALL_SIDES,glow-0.045]);
  33. llSetLinkAlpha(LINK_SET,alpha + 0.05,ALL_SIDES);
  34. if (alpha >= 1.0)
  35. {
  36. llSetTimerEvent(0.0);
  37. llSetLinkPrimitiveParams(LINK_SET,[PRIM_GLOW,ALL_SIDES,0.1]);
  38. llSetLinkAlpha(LINK_SET,1.0,ALL_SIDES);
  39. }
  40. }
  41.  
  42.  
  43. }
  44.  
  45. creates materialization on object - added sound scripts to make a sound play while this materialization occurs sound doesnt play unless i restart the scripts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement