Jump to content

Particle Scripting


FurryNinjaKitten
 Share

You are about to reply to a thread that has been inactive for 3591 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I know this should be easy, but I'm totally stumped by the 1st line in this code- I obtained it by getting a "Ez particle generator v2.0.1" from the marketplace & it gives me this code for wildflowers I've made into a rainbow mandela:


llParticleSystem([
PSYS_PART_FLAGS, 323,
PSYS_SRC_PATTERN, 4,
PSYS_PART_START_ALPHA, 1.000000,
PSYS_PART_END_ALPHA, 1.000000,
PSYS_PART_START_COLOR, <0.000000, 1.000000, 1.000000>,
PSYS_PART_END_COLOR, <1.000000, 1.000000, 0.000000>,
PSYS_PART_START_SCALE, <2.000000, 2.000000, 0.00000>,
PSYS_PART_END_SCALE, <0.000000, 0.000000, 0.000000>,
PSYS_PART_MAX_AGE, 10.000000,
PSYS_SRC_MAX_AGE, 0.000000,
PSYS_SRC_ACCEL, <0.000000, 0.000000, 0.000000>,
PSYS_SRC_ANGLE_BEGIN, 3.141593,
PSYS_SRC_ANGLE_END, 3.141593,
PSYS_SRC_BURST_PART_COUNT, 1,
PSYS_SRC_BURST_RATE, 0.080000,
PSYS_SRC_BURST_RADIUS, 4.000000,
PSYS_SRC_BURST_SPEED_MIN, 0.000000,
PSYS_SRC_BURST_SPEED_MAX, 0.000000,
PSYS_SRC_OMEGA, <7.000000, 0.000000, 0.000000>,
PSYS_SRC_TARGET_KEY,llGetKey(),
PSYS_SRC_TEXTURE, "c7494967-ba0d-1d2a-686f-010f2c211738"]);

 

It all looks good according to the particle generator but when I go to make a script from it it it keeps telling me there is a syntax error on line 0, column17- the very first line. I've messed with the brackets but still keep coming up with an error. I'd like to be able to turn it on and off too.  I've found this code for turning on & off particle scripts:

http://community.secondlife.com/t5/LSL-Scripting/Adding-ON-OFF-To-particle-script/m-p/2348249/highlight/true#M20938

which has somehow worked when all else failed without coming up with an error message, though the code is exactly the same as I was trying, except with the PSYS variables starting on the same line as the llParticleSystem([ instead of a new one.

Anyway, please let me know what I did wrong (or the generator program was doing wrong) and what the most efficient way to script on & off into the particle effect, thanks.

 

Link to comment
Share on other sites

^^ (:

 

integer on; // is off (not on) to startdefault{    touch_end(integer total_number)    {        if(on = !on)  // flip switch            // switch is on so particles on            llParticleSystem([                PSYS_PART_FLAGS, 323,                PSYS_SRC_PATTERN, 4,                PSYS_PART_START_ALPHA, 1.000000,                PSYS_PART_END_ALPHA, 1.000000,                PSYS_PART_START_COLOR, <0.000000, 1.000000, 1.000000>,                PSYS_PART_END_COLOR, <1.000000, 1.000000, 0.000000>,                PSYS_PART_START_SCALE, <2.000000, 2.000000, 0.00000>,                PSYS_PART_END_SCALE, <0.000000, 0.000000, 0.000000>,                PSYS_PART_MAX_AGE, 10.000000,                PSYS_SRC_MAX_AGE, 0.000000,                PSYS_SRC_ACCEL, <0.000000, 0.000000, 0.000000>,                PSYS_SRC_ANGLE_END, 3.141593,                PSYS_SRC_BURST_PART_COUNT, 1,                PSYS_SRC_BURST_RATE, 0.080000,                PSYS_SRC_BURST_RADIUS, 4.000000,                PSYS_SRC_BURST_SPEED_MIN, 0.000000,                PSYS_SRC_BURST_SPEED_MAX, 0.000000,                PSYS_SRC_OMEGA, <7.000000, 0.000000, 0.000000>,                PSYS_SRC_TARGET_KEY, llGetKey(),                PSYS_SRC_TEXTURE, "c7494967-ba0d-1d2a-686f-010f2c211738"]);           else  // switch was flipped to off (not on) so particles off            llParticleSystem([]);                  }       }

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3591 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...