FurryNinjaKitten Posted June 19, 2014 Share Posted June 19, 2014 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 More sharing options...
Dora Gustafson Posted June 19, 2014 Share Posted June 19, 2014 What you list here is ONE single LSL-function and it need to be included in an event-handler which again need to be included in a state in order to form a proper script. I can only advise you to consult the wiki and read the examples on how this function is used :smileysurprised::smileyvery-happy: Link to comment Share on other sites More sharing options...
irihapeti Posted June 19, 2014 Share Posted June 19, 2014 ^^ (: 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 More sharing options...
Recommended Posts
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