Advertisement
giratina1999

particle help needed

Feb 17th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //i have these particles and i want them to be activated by another prim if collided then they will activate but then stop until another collision
  2.  
  3. //Particles VVVVVV
  4.  
  5. integer glow = TRUE;            // Make the particles glow
  6. integer bounce = FALSE;          // Make particles bounce on Z plan of object
  7. integer interpColor = TRUE;     // Go from start to end color
  8. integer interpSize = TRUE;      // Go from start to end size
  9. integer wind = FALSE;           // Particles effected by wind
  10. integer followSource = FALSE;    // Particles follow the source
  11. integer followVel = TRUE;       // Particles turn to velocity direction
  12.  
  13. // Choose a pattern from the following:
  14. // PSYS_SRC_PATTERN_EXPLODE
  15. // PSYS_SRC_PATTERN_DROP
  16. // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
  17. // PSYS_SRC_PATTERN_ANGLE_CONE
  18. // PSYS_SRC_PATTERN_ANGLE
  19. integer pattern = PSYS_SRC_PATTERN_EXPLODE;
  20.  
  21. // Select a target for particles to go towards
  22. // "" for no target, "owner" will follow object owner
  23. //    and "self" will target this object
  24. //    or put the key of an object for particles to go to
  25. key target = "";
  26.  
  27. // Particle paramaters
  28. float age = 1.5;                  // Life of each particle
  29. float maxSpeed = .2;            // Max speed each particle is spit out at
  30. float minSpeed = .1;            // Min speed each particle is spit out at
  31. string texture;                 // Texture used for particles, default used if blank
  32. float startAlpha = 10;           // Start alpha (transparency) value
  33. float endAlpha = 10;           // End alpha (transparency) value
  34. vector startColor = <0,25,0>;    // Start color of particles <R,G,B>
  35. vector endColor = <0.000, 0.455, 0.851>;      // End color of particles <R,G,B> (if interpColor == TRUE)
  36. vector startSize = <.5,.5,.5>;     // Start size of particles
  37. vector endSize = <.1,.1,.1>;       // End size of particles (if interpSize == TRUE)
  38. vector push = <0,0,1>;          // Force pushed on particles
  39.  
  40. // System paramaters
  41. float rate = .1;            // How fast (rate) to emit particles
  42. float radius = 0.1;          // Radius to emit particles for BURST pattern
  43. integer count = 20;        // How many particles to emit per BURST
  44. float outerAngle = 1.54;    // Outer angle for all ANGLE patterns
  45. float innerAngle = 1.55;    // Inner angle for all ANGLE patterns
  46. vector omega = <0,0,10>;    // Rotation of ANGLE patterns around the source
  47. float life = 0;             // Life in seconds for the system to make particles
  48.  
  49. // Script variables
  50. integer flags;
  51.  
  52. updateParticles()
  53. {
  54.     flags = 0;
  55.     if (target == "owner") target = llGetOwner();
  56.     if (target == "self") target = llGetKey();
  57.     if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
  58.     if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
  59.     if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
  60.     if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
  61.     if (wind) flags = flags | PSYS_PART_WIND_MASK;
  62.     if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
  63.     if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
  64.     if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
  65.  
  66.     llParticleSystem([  PSYS_PART_MAX_AGE,age,
  67.                         PSYS_PART_FLAGS,flags,
  68.                         PSYS_PART_START_COLOR, startColor,
  69.                         PSYS_PART_END_COLOR, endColor,
  70.                         PSYS_PART_START_SCALE,startSize,
  71.                         PSYS_PART_END_SCALE,endSize,
  72.                         PSYS_SRC_PATTERN, pattern,
  73.                         PSYS_SRC_BURST_RATE,rate,
  74.                         PSYS_SRC_ACCEL, push,
  75.                         PSYS_SRC_BURST_PART_COUNT,count,
  76.                         PSYS_SRC_BURST_RADIUS,radius,
  77.                         PSYS_SRC_BURST_SPEED_MIN,minSpeed,
  78.                         PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
  79.                         PSYS_SRC_TARGET_KEY,target,
  80.                         PSYS_SRC_INNERANGLE,innerAngle,
  81.                         PSYS_SRC_OUTERANGLE,outerAngle,
  82.                         PSYS_SRC_OMEGA, omega,
  83.                         PSYS_SRC_MAX_AGE, life,
  84.                         PSYS_SRC_TEXTURE, texture,
  85.                         PSYS_PART_START_ALPHA, startAlpha,
  86.                         PSYS_PART_END_ALPHA, endAlpha
  87.                             ]);
  88. }
  89.  
  90. default
  91. {
  92.     state_entry()
  93.     {
  94.         updateParticles();
  95.     }
  96. }
  97.  
  98.  
  99.  
  100.  
  101.  
  102. //What will activate the paricles
  103.  
  104.  
  105. default
  106. {
  107.     collision_start(integer num)
  108.     {
  109.         llSay(2, "start");
  110.     }
  111.    
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement