SaphireBling_1.lsl 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. // :CATEGORY:Bling
  2. // :NAME:SaphireBling
  3. // :AUTHOR:Ama Omega
  4. // :CREATED:2010-01-10 05:20:56.000
  5. // :EDITED:2013-09-18 15:39:01
  6. // :ID:720
  7. // :NUM:985
  8. // :REV:1.0
  9. // :WORLD:Second Life
  10. // :DESCRIPTION:
  11. // SaphireBling.lsl
  12. // :CODE:
  13. //BLING PARTICLES FOR BLINGY JEWELS AND STUFF Adapted by Stormy Roentgren
  14. //For those not knowing how to alter particle scripts, the parameters you'll want to alter here (if you choose to) are the "float rate" and the start and end sizes.
  15. // Particle Script 0.3
  16. // Created by Ama Omega
  17. // 10-10-2003
  18. // Mask Flags - set to TRUE to enable
  19. integer glow = TRUE; // Make the particles glow
  20. integer bounce = FALSE; // Make particles bounce on Z plan of object
  21. integer interpColor = TRUE; // Go from start to end color
  22. integer interpSize = TRUE; // Go from start to end size
  23. integer wind = FALSE; // Particles effected by wind
  24. integer followSource = FALSE; // Particles follow the source
  25. integer followVel = TRUE; // Particles turn to velocity direction
  26. // Choose a pattern from the following:
  27. // PSYS_SRC_PATTERN_EXPLODE
  28. // PSYS_SRC_PATTERN_DROP
  29. // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
  30. // PSYS_SRC_PATTERN_ANGLE_CONE
  31. // PSYS_SRC_PATTERN_ANGLE
  32. integer pattern = PSYS_SRC_PATTERN_EXPLODE;
  33. // Select a target for particles to go towards
  34. // "" for no target, "owner" will follow object owner
  35. // and "self" will target this object
  36. // or put the key of an object for particles to go to
  37. key target = "";
  38. // Particle paramaters
  39. float age = .2; // Life of each particle
  40. float maxSpeed = .1; // Max speed each particle is spit out at
  41. float minSpeed = .1; // Min speed each particle is spit out at
  42. string texture = "f72c27b9-db37-71c6-eb6c-cac85815e854"; // Texture used for particles, default used if blank
  43. float startAlpha = 10; // Start alpha (transparency) value
  44. float endAlpha = 10; // End alpha (transparency) value
  45. vector startColor = <1,1,1>; // Start color of particles <R,G,B>
  46. vector endColor = <1,1,1>; // End color of particles <R,G,B> (if interpColor == TRUE)
  47. vector startSize = <.04,.25,.01>; // Start size of particles
  48. vector endSize = <.03,.25,.01>; // End size of particles (if interpSize == TRUE)
  49. vector push = <0,0,0>; // Force pushed on particles
  50. // System paramaters
  51. float rate = 5; // How fast (rate) to emit particles
  52. float radius = .0; // Radius to emit particles for BURST pattern
  53. integer count = 5; // How many particles to emit per BURST
  54. float outerAngle = 1.54; // Outer angle for all ANGLE patterns
  55. float innerAngle = 1.55; // Inner angle for all ANGLE patterns
  56. vector omega = <0,0,10>; // Rotation of ANGLE patterns around the source
  57. float life = 0; // Life in seconds for the system to make particles
  58. // Script variables
  59. integer flags;
  60. updateParticles()
  61. {
  62. flags = 0;
  63. if (target == "owner") target = llGetOwner();
  64. if (target == "self") target = llGetKey();
  65. if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
  66. if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
  67. if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
  68. if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
  69. if (wind) flags = flags | PSYS_PART_WIND_MASK;
  70. if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
  71. if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
  72. if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
  73. llParticleSystem([ PSYS_PART_MAX_AGE,age,
  74. PSYS_PART_FLAGS,flags,
  75. PSYS_PART_START_COLOR, startColor,
  76. PSYS_PART_END_COLOR, endColor,
  77. PSYS_PART_START_SCALE,startSize,
  78. PSYS_PART_END_SCALE,endSize,
  79. PSYS_SRC_PATTERN, pattern,
  80. PSYS_SRC_BURST_RATE,rate,
  81. PSYS_SRC_ACCEL, push,
  82. PSYS_SRC_BURST_PART_COUNT,count,
  83. PSYS_SRC_BURST_RADIUS,radius,
  84. PSYS_SRC_BURST_SPEED_MIN,minSpeed,
  85. PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
  86. PSYS_SRC_TARGET_KEY,target,
  87. PSYS_SRC_INNERANGLE,innerAngle,
  88. PSYS_SRC_OUTERANGLE,outerAngle,
  89. PSYS_SRC_OMEGA, omega,
  90. PSYS_SRC_MAX_AGE, life,
  91. PSYS_SRC_TEXTURE, texture,
  92. PSYS_PART_START_ALPHA, startAlpha,
  93. PSYS_PART_END_ALPHA, endAlpha
  94. ]);
  95. }
  96. default
  97. {
  98. state_entry()
  99. {
  100. updateParticles();
  101. }
  102. }// END //