Advertisement
Guest User

Ribbon particle example

a guest
Sep 13th, 2013
168
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Ribbon particle demo object, by Maestro Linden. Spins around to demonstrate ribbon particles.
  2. // 1) Rez 2 boxes, and link them together
  3. // 2) Save this script in the root prim
  4. // 3) Particles using the ribbon mask are emitted from the child prim, as the root prim spins around.
  5. default
  6. {
  7. state_entry()
  8. {
  9. // particle texture to use
  10. key texture = "f2018c32-9d50-41b7-d28a-ec558b97a00c";
  11. llSetLinkPrimitiveParamsFast(1, [PRIM_TEXTURE, ALL_SIDES, texture, <1,1,0>, ZERO_VECTOR, 0.0]);
  12.  
  13. // spin the linkset
  14. llTargetOmega(<0,0,1>, 1, 1);
  15. // offset, rotate, and hide the child prim
  16. llSetLinkPrimitiveParams(2, [PRIM_ROT_LOCAL, <-0.55141, -0.02408, -0.03638, 0.83309>,
  17. PRIM_POS_LOCAL, <0.0, 1.0, 0.0>,
  18. PRIM_COLOR, ALL_SIDES, <0,0,0>, 0.0]);
  19. llLinkParticleSystem(2, [
  20. PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP,
  21. PSYS_PART_FLAGS, PSYS_PART_RIBBON_MASK|PSYS_PART_INTERP_COLOR_MASK,
  22. PSYS_PART_START_SCALE, <0.25, 2.0, 0.0>,
  23. PSYS_PART_START_ALPHA, 1.0,
  24. PSYS_PART_END_ALPHA, 0.0,
  25. PSYS_PART_MAX_AGE, 3.0,
  26. PSYS_SRC_TEXTURE, texture
  27. ]);
  28. }
  29. }
Advertisement
RAW Paste Data Copied
Advertisement