Share Pastebin
Guest
Public paste!

Static

By: a guest | Feb 9th, 2010 | Syntax: None | Size: 0.96 KB | Hits: 10 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. //Particle settings; see http://lslwiki.net/lslwiki/wakka.php?wakka=llParticleSystem to find out what
  2. //these do and how to modify or augment them
  3.  
  4. list myParticles = [PSYS_PART_START_COLOR,<1,1,.6>,
  5. PSYS_PART_START_SCALE,0.01,
  6. PSYS_PART_END_SCALE,0.01,
  7. PSYS_PART_MAX_AGE,15,
  8. PSYS_SRC_ACCEL,1,
  9. PSYS_SRC_ANGLE_END,1.5,
  10. PSYS_SRC_BURST_PART_COUNT,15,
  11. PSYS_SRC_BURST_RADIUS,1,
  12. PSYS_SRC_BURST_RATE,14,
  13. PSYS_SRC_BURST_SPEED_MAX,1,
  14. PSYS_PART_EMISSIVE_MASK,1,
  15. PSYS_PART_WIND_MASK,1
  16. ]
  17. ;
  18.  
  19. change_effect()
  20. {
  21.     vector sun = llGetSunDirection();
  22.  
  23.     if (sun.z <= 0)
  24.         llParticleSystem(myParticles);
  25.     else if (sun.z > 0)
  26.         llParticleSystem([]);
  27. }
  28.  
  29. default
  30. {
  31.     state_entry()
  32.     {
  33.         llSetTimerEvent(1800); // Check every 30 minutes
  34.     }
  35.  
  36.     timer()
  37.     {
  38.         change_effect();
  39.     }
  40.  
  41.     touch_start(integer total_number)
  42.     {
  43.         change_effect();
  44.     }
  45.  
  46.     on_rez(integer x)
  47.     {
  48.         change_effect();
  49.     }
  50. }