[Opensim-users] llParticleSystem script issues in OpenSim

dz dz at bitzend.net
Tue Jan 12 18:50:22 UTC 2010


 Clive,

I had a chance to review your script..  Although it may work in SL, such a
minimal definition of a particle system relies heavily on the default
parameters,  Obviously, the default particle system parameters differ from
SL to OpenSim.   Although I wouldn't recommend using this script as an
example, It is possible to make it emit particles with the addition of a
single line...

    PSYS_SRC_BURST_PART_COUNT,  2,                  //Number of particles
per emission

So the resulting code section would be ....

++++  begin code+++

  llParticleSystem(
    [
    PSYS_SRC_BURST_PART_COUNT,  2,                  //Number of particles
per emission

    PSYS_PART_FLAGS,         PSYS_PART_WIND_MASK | PSYS_PART_EMISSIVE_MASK,
    PSYS_SRC_PATTERN,  PSYS_SRC_PATTERN_EXPLODE,
    PSYS_PART_START_COLOR,   <1,1,0>,

    ] );

+++  end code +++

I would also recommend that if you intend to show students this script as an
example of how to create particles, you should include the attribution
required  for including code found on the lsl wiki.    At a minimum, add
this to the header..

// This work uses content from the Second Life Wiki articles:
//                         http://wiki.secondlife.com/wiki/LlParticleSystem
// Copyright © 2007-2010 Linden Research, Inc.
//        Licensed under the Creative Commons Attribution-Share Alike 3.0
License.
//                         http://creativecommons.org/licenses/by-sa/3.0/


There is a VERY NICE Particle script resource @
http://particles-lsl-generator.bashora.com/index.php.   It provides a user
with a chance to use a web page to review the effect of, and set values for,
all the relevant parameters.   It will also auto-generates a script that you
can use.

D

++++++++++++++++++++
From: Clive Gould <cliveg at gmail.com>
To: opensim-users at lists.berlios.de
Date: Sun, 10 Jan 2010 13:10:32 +0000
Subject: [Opensim-users] llParticleSystem
Hi

I'm in the process of copying my LSL exhibition from SL into a hypergrided
OpenSim standalone. Eventually I hope to make this available as an OAR file
to the community.

I'm gradually copying the posters and their accompanying scripts over and
all is well up to poster 21. I'm struggling with the poster 21 script that
works fine in SL, but doesn't appear to work in OpenSim.

I suspect the problem lies with the llParticleSystem function. I append the
script to this posting.

....

// Code for Poster 21:

integer second;

default
{
   state_entry()
   {
       second = 0;
       llParticleSystem( [] );  //reset system
       state new;
   }
}

state new
{
   touch_start(integer total_number)
   {
   // output particles
   llParticleSystem(
  [
   PSYS_PART_FLAGS,         PSYS_PART_WIND_MASK | PSYS_PART_EMISSIVE_MASK,
   PSYS_SRC_PATTERN,  PSYS_SRC_PATTERN_EXPLODE,
   PSYS_PART_START_COLOR,   <1,1,0>
  ] );
  llSetTimerEvent( 1 );
   }

   timer ()
   //delay 10 seconds before reset
   {  second ++;
       if(second > 10)
       {
          llResetScript();  //reset
   }
}
}

// End of code;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20100112/4ec39bbf/attachment.html>


More information about the Opensim-users mailing list