Difference between revisions of "LlMakeSmoke"

From Second Life Wiki
Jump to navigation Jump to search
Line 14: Line 14:
|also_tests
|also_tests
|also_articles
|also_articles
|notes
|notes=
|cat1
|cat2
|cat3
|cat4=Particles
|deprecated=llParticleSystem
}}
 
 
Beginning in 1.14, the simulator will be using llParticleSystem to emulate legacy llMakeSmoke particles.
Beginning in 1.14, the simulator will be using llParticleSystem to emulate legacy llMakeSmoke particles.
 
<pre>
llMakeSmoke(integer particle_count,
llMakeSmoke(integer particle_count,
           float particle_scale,
           float particle_scale,
           float particle_speed,
           float particle_speed,
Line 32: Line 24:
           string source_texture_id,
           string source_texture_id,
           vector local_offset);
           vector local_offset);
 
</pre>
fakeMakeSmoke(integer particle_count, float particle_scale, float particle_speed,
<pre>
fakeMakeSmoke(integer particle_count, float particle_scale, float particle_speed,
             float particle_lifetime, float source_cone, string source_texture_id,
             float particle_lifetime, float source_cone, string source_texture_id,
             vector local_offset)
             vector local_offset)
{
{
//      local_offset is ignored
//      local_offset is ignored
  llParticleSystem([
  llParticleSystem([
      PSYS_PART_FLAGS,              PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_WIND_MASK,
      PSYS_PART_FLAGS,              PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_WIND_MASK,
      PSYS_SRC_PATTERN,          PSYS_SRC_PATTERN_ANGLE_CONE,
      PSYS_SRC_PATTERN,          PSYS_SRC_PATTERN_ANGLE_CONE,
      PSYS_PART_START_COLOR,       <1.0, 1.0, 1.0>,
      PSYS_PART_START_COLOR,     <1.0, 1.0, 1.0>,
      PSYS_PART_END_COLOR,           <1.0, 1.0, 1.0>,
      PSYS_PART_END_COLOR,       <1.0, 1.0, 1.0>,
      PSYS_PART_START_ALPHA,       1.00,
      PSYS_PART_START_ALPHA,     1.00,
      PSYS_PART_END_ALPHA,           0.05,
      PSYS_PART_END_ALPHA,       0.05,
      PSYS_PART_START_SCALE,       <particle_scale, particle_scale, 0.0>,
      PSYS_PART_START_SCALE,     <particle_scale, particle_scale, 0.0>,
      PSYS_PART_END_SCALE,           <10, 10, 0.0>,       PSYS_PART_MAX_AGE,           3.0,
      PSYS_PART_END_SCALE,       <10, 10, 0.0>,
      PSYS_SRC_ACCEL,               <0.0, 0.0, 0.0>,
      PSYS_PART_MAX_AGE,         3.0,
      PSYS_SRC_TEXTURE,          source_texture_id,
      PSYS_SRC_ACCEL,             <0.0, 0.0, 0.0>,
      PSYS_SRC_BURST_RATE,           10 / particle_count,
      PSYS_SRC_TEXTURE,          source_texture_id,
      PSYS_SRC_ANGLE_BEGIN,      0.0,
      PSYS_SRC_BURST_RATE,       10 / particle_count,
      PSYS_SRC_ANGLE_END,           source_cone * PI,
      PSYS_SRC_ANGLE_BEGIN,      0.0,
      PSYS_SRC_BURST_PART_COUNT,  1,
      PSYS_SRC_ANGLE_END,         source_cone * PI,
      PSYS_SRC_BURST_RADIUS,       0.0,
      PSYS_SRC_BURST_PART_COUNT,  1,
      PSYS_SRC_BURST_SPEED_MIN,  particle_speed,
      PSYS_SRC_BURST_RADIUS,     0.0,
      PSYS_SRC_BURST_SPEED_MAX,  particle_speed,
      PSYS_SRC_BURST_SPEED_MIN,  particle_speed,
      PSYS_SRC_MAX_AGE,          particle_lifetime / 2,
      PSYS_SRC_BURST_SPEED_MAX,  particle_speed,
      PSYS_SRC_OMEGA,               <0.0, 0.0, 0.0>
      PSYS_SRC_MAX_AGE,          particle_lifetime / 2,
      ]);
      PSYS_SRC_OMEGA,             <0.0, 0.0, 0.0>
}
      ]);
  //    Known discrepencies:
}
//    1) The original llMakeSmoke has random particle lifetime, which cannot be
//    Known discrepencies:
//      created in the current particle system via a single call
//    1) The original llMakeSmoke has random particle lifetime, which cannot be
  //    2) The original llMakeSmoke has continual particle growth throughout its
//      created in the current particle system via a single call
//      lifetime, ending well past the 4m limit of the current system, on long lived
//    2) The original llMakeSmoke has continual particle growth throughout its
//      particles
//      lifetime, ending well past the 4m limit of the current system, on long lived
  //    3) several values are not taken 'verbatim' in the original particle system
//      particles
//      (velocity is not m/sec for instance, and number of particles seems to be
//    3) several values are not taken 'verbatim' in the original particle system
//      wildly off), these are approximated loosely in this simulation via basic
//      (velocity is not m/sec for instance, and number of particles seems to be
//      divisors, which may not work out the same in some scenarios
//      wildly off), these are approximated loosely in this simulation via basic
  //    4) There is no way to duplicate the offset from the old functions within the
//      divisors, which may not work out the same in some scenarios
//      new particle system
//    4) There is no way to duplicate the offset from the old functions within the
//      new particle system
</pre>
|cat1
|cat2
|cat3
|cat4=Particles
|deprecated=llParticleSystem
}}

Revision as of 02:40, 24 March 2007

Emblem-important.png Deprecated
(This function has been deprecated, please use llParticleSystem instead.)

Summary

Function: llMakeSmoke( integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset );

Make smoke like particles

• integer particles
• float scale
• float vel
• float lifetime
• float arc
• string texture
• vector offset

Caveats

  • This function causes the script to sleep for 0.1 seconds.
  • This function has been deprecated, please use llParticleSystem instead.
All Issues ~ Search JIRA for related Bugs

Examples

Notes

Beginning in 1.14, the simulator will be using llParticleSystem to emulate legacy llMakeSmoke particles.

llMakeSmoke(integer particle_count,
           float particle_scale,
           float particle_speed,
           float particle_lifetime,
           float source_cone,
           string source_texture_id,
           vector local_offset);
fakeMakeSmoke(integer particle_count, float particle_scale, float particle_speed,
             float particle_lifetime, float source_cone, string source_texture_id,
             vector local_offset)
{
//       local_offset is ignored
   llParticleSystem([
       PSYS_PART_FLAGS,               PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_WIND_MASK,
       PSYS_SRC_PATTERN,           PSYS_SRC_PATTERN_ANGLE_CONE,
       PSYS_PART_START_COLOR,      <1.0, 1.0, 1.0>,
       PSYS_PART_END_COLOR,        <1.0, 1.0, 1.0>,
       PSYS_PART_START_ALPHA,      1.00,
       PSYS_PART_END_ALPHA,        0.05,
       PSYS_PART_START_SCALE,      <particle_scale, particle_scale, 0.0>,
       PSYS_PART_END_SCALE,        <10, 10, 0.0>,
       PSYS_PART_MAX_AGE,          3.0,
       PSYS_SRC_ACCEL,             <0.0, 0.0, 0.0>,
       PSYS_SRC_TEXTURE,           source_texture_id,
       PSYS_SRC_BURST_RATE,        10 / particle_count,
       PSYS_SRC_ANGLE_BEGIN,       0.0,
       PSYS_SRC_ANGLE_END,         source_cone * PI,
       PSYS_SRC_BURST_PART_COUNT,  1,
       PSYS_SRC_BURST_RADIUS,      0.0,
       PSYS_SRC_BURST_SPEED_MIN,   particle_speed,
       PSYS_SRC_BURST_SPEED_MAX,   particle_speed,
       PSYS_SRC_MAX_AGE,           particle_lifetime / 2,
       PSYS_SRC_OMEGA,             <0.0, 0.0, 0.0>
       ]);
}
//    Known discrepencies:
//    1) The original llMakeSmoke has random particle lifetime, which cannot be
//       created in the current particle system via a single call
//    2) The original llMakeSmoke has continual particle growth throughout its
//       lifetime, ending well past the 4m limit of the current system, on long lived
//       particles
//    3) several values are not taken 'verbatim' in the original particle system
//       (velocity is not m/sec for instance, and number of particles seems to be
//       wildly off), these are approximated loosely in this simulation via basic
//       divisors, which may not work out the same in some scenarios
//    4) There is no way to duplicate the offset from the old functions within the
//       new particle system

Deep Notes

Search JIRA for related Issues

Signature

function void llMakeSmoke( integer particles, float scale, float vel, float lifetime, float arc, string texture, vector offset );