[Opensim-dev] llParticleSystem

Charles Krinke cfk at pacbell.net
Tue Sep 25 14:56:45 UTC 2007


Dear Tedd and others:
 
I'm looking into the particle system and I see some of the nuances, but not all of them. One of the nuances I am struggling with is the list coming into our call in LSL_BuiltIn_Commands.cs.
 
In looking at wiki.secondlife.com, it indicates the prototype as "void llParticleSystem(list rules);" and then states that 
 
list rules - Particle system rules list in the format [rule1, data1, rule2, data2, ... rulen, datan].
 
I presume this means that our C# code will get two list items for every rule that is filled out in the script. If only one arg is written in the script, we get two list items. If 22 args are written in the script, we will get 44 list items. Can you confirm that this is a variable number and not a constant, in which case, I will do query the "list.Length" member to determine the number of rules.
 
My other question concerns how we, or if we, should parse this list. In our logic, we should, I believe, declare a "Primitive.ParticleSystem prules = new Primitive.ParticleSystem()". This has members already defined and they are visible in BuiltIn_Commands. For instance, I can perform this assignment and the code compiles, along with each of the other 22 or so PSBlock elements.
 
prules.CRC = (uint)rules[n]
 
I tried casting "list<Object> rules" coming into the subroutine, but that neither works, nor even if it did work am I sure it is the right thing to do.
 
I can identify the rule number of a number of the 22 or so elements, for instance, I believe these are rule numbers and they come from wiki.secondlife.com
 
PartFlags = 0
Pattern  = 9
BurstRate = 13
BurstPartCount = 15
BurstRadius = 16
BurstSpeedMin = 17
BurstSpeedMax = 18
MaxAge = 19
Target = 20
 
Perhaps, these are the integers that are in the rule number in the list coming into our subroutine?
 
In any case, a few suggestions would be appreciated.
 
Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20070925/72216498/attachment-0001.html>


More information about the Opensim-dev mailing list