Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. integer CMD_CH = -1024;
  2. integer steps = 10;
  3. float counter = 0;
  4. float fRateIncrease = 0.1;
  5. float fMinRate = 0.0;
  6. float fMaxRate = 1.0;
  7. vector kleur;
  8. glow()
  9. {
  10.  
  11. llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_GLOW, ALL_SIDES, counter]);
  12.  
  13. }
  14. default
  15. {
  16. state_entry()
  17. {
  18. llListen(CMD_CH, "", "", "");
  19. llSetTimerEvent(0.022);
  20. llSetAlpha(0.0, ALL_SIDES);
  21. llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, <0,0,0>, 0.514, 5.000, 0.250]);
  22. }
  23.  
  24. listen(integer ch, string name, key id, string msg)
  25. {
  26. list items = llParseString2List(msg, [","], []);
  27. string command = llList2String(items, 0);
  28.  
  29. vector colorcode = (vector)llList2CSV(llList2List(items,1, -1));
  30.  
  31.  
  32. list items1 = llParseString2List(msg, [","], []);
  33. string command1 = llList2String(items1, 0);
  34.  
  35. if (id != llGetOwner() && llList2Key(llGetObjectDetails(id, [OBJECT_OWNER]), 0) != llGetOwner())
  36. {
  37. return; //Owner only.
  38. }
  39.  
  40. if(command = "color"){
  41.  
  42. llSetColor((vector)colorcode, ALL_SIDES);
  43. // llSay(0,(string)msg);
  44. llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, colorcode, 0.514, 5.000, 0.250]);
  45. kleur = (vector)colorcode;
  46.  
  47. }
  48. if(command1 == "glowup")
  49. {
  50.  
  51. llSetAlpha(1.0, ALL_SIDES);
  52. llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, kleur, 0.514, 5.000, 0.250]);
  53. counter = counter + fRateIncrease;
  54.  
  55. }if (counter > fMaxRate)
  56. {
  57. counter = fMaxRate;
  58.  
  59. }
  60. if(command1 == "glowdown")
  61. {
  62.  
  63. counter = counter - fRateIncrease;
  64.  
  65. }if (counter < fMinRate)
  66. {
  67.  
  68. counter = fMinRate;
  69. llSetAlpha(0.0, ALL_SIDES);
  70. llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, colorcode, 0.514, 5.000, 0.250]);
  71. }
  72. }timer()
  73. {
  74. glow();
  75. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement