Kira Pearl
Living it & loving it ;)
Join date: 17 Dec 2008
Posts: 14
|
01-16-2009 18:04
hello again scripting people.. since i had a very bad experience with scripting in sl.. inworld and out.. i am hoping you cut me some slack this time.. I am trying to figure out how to create a particle script that basically looks like snow in a snow globe. I went to the sl script library and a very nice place called particle library and got myself a couple of these scripts.. i ran around the particle library but stopped at how to change or set a texture.. i didn't really get that part  so what i ended up having is a particle system that SHOOTS white thingies high in the air!?  i tried to mess with the radius so that it would atleast look more like snow than white lava but no use.. it looks more like.. milk being poured!?  i also noticed that you can set these particles to go up then down as if they were in a snow globe.. which is EXACTLY what i want.. can somebody tell me what to mess with and what to leave in that darn script!?  i need to change the texture.. so do i just drop the texture in the prim and put the name in the script along with the line or what? and the globe effect..? where do i fix that? please help me understand rather than giving me the script  THANK YOU! ^.^ P.S.: i read the wiki... no clue  english please? 
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
01-16-2009 18:40
Look in the LSL Wiki's library for the standard particle script. You have to simply mess with the various parameters until you get something that looks right, or go back to the Particle Laboratory and play with some of their lab exercises until you get a feel for what the parameters do. Another way, of course, is to find something with a particle script in it that already does what you want, take it apart, and see how it works. Here are the innards of a freebie snow maker that I have lying around. Try putting them into that particle script from the wiki library as a starting point for your own experiments... integer glow = TRUE; // Make the particles glow integer bounce = FALSE; // Make particles bounce on Z plan of object integer interpColor = TRUE; // Go from start to end color integer interpSize = TRUE; // Go from start to end size integer wind = FALSE; // Particles effected by wind integer followSource = FALSE; // Particles follow the source integer followVel = FALSE; // Particles turn to velocity direction // Particle paramaters integer pattern = PSYS_SRC_PATTERN_EXPLODE; float age = 100; // Life of each particle float maxSpeed = 0.4; // Max speed each particle is spit out at float minSpeed = 0.4; // Min speed each particle is spit out at string texture; // Texture used for particles, default used if blank float startAlpha = 1; // Start alpha (transparency) value float endAlpha = 1; // End alpha (transparency) value vector startColor = <1,1,1>; // Start color of particles <R,G,B> vector endColor = <1,1,1>; // End color of particles <R,G,B> (if interpColor == TRUE) vector startSize = <.1,.1,.1>; // Start size of particles vector endSize = <.1,.1,.1>; // End size of particles (if interpSize == TRUE) vector push = <0,0,-0.03>; // Force pushed on particles // System paramaters float rate = .01; // How fast (rate) to emit particles float radius = .1; // Radius to emit particles for BURST pattern integer count = 10; // How many particles to emit per BURST float outerAngle = 1.54; // Outer angle for all ANGLE patterns float innerAngle = 1.55; // Inner angle for all ANGLE patterns vector omega = <0,0,10>; // Rotation of ANGLE patterns around the source float life = 0; // Life in seconds for the system to make particles
Good luck.
|
Denali Moonites
Registered User
Join date: 12 Dec 2008
Posts: 0
|
01-17-2009 07:45
From: Rolig Loon Look in the LSL Wiki's library for the standard particle script. You have to simply mess with the various parameters until you get something that looks right, or go back to the Particle Laboratory and play with some of their lab exercises until you get a feel for what the parameters do. Another way, of course, is to find something with a particle script in it that already does what you want, take it apart, and see how it works. Here are the innards of a freebie snow maker that I have lying around. Try putting them into that particle script from the wiki library as a starting point for your own experiments... integer glow = TRUE; // Make the particles glow integer bounce = FALSE; // Make particles bounce on Z plan of object integer interpColor = TRUE; // Go from start to end color integer interpSize = TRUE; // Go from start to end size integer wind = FALSE; // Particles effected by wind integer followSource = FALSE; // Particles follow the source integer followVel = FALSE; // Particles turn to velocity direction // Particle paramaters integer pattern = PSYS_SRC_PATTERN_EXPLODE; float age = 100; // Life of each particle float maxSpeed = 0.4; // Max speed each particle is spit out at float minSpeed = 0.4; // Min speed each particle is spit out at string texture; // Texture used for particles, default used if blank float startAlpha = 1; // Start alpha (transparency) value float endAlpha = 1; // End alpha (transparency) value vector startColor = <1,1,1>; // Start color of particles <R,G,B> vector endColor = <1,1,1>; // End color of particles <R,G,B> (if interpColor == TRUE) vector startSize = <.1,.1,.1>; // Start size of particles vector endSize = <.1,.1,.1>; // End size of particles (if interpSize == TRUE) vector push = <0,0,-0.03>; // Force pushed on particles // System paramaters float rate = .01; // How fast (rate) to emit particles float radius = .1; // Radius to emit particles for BURST pattern integer count = 10; // How many particles to emit per BURST float outerAngle = 1.54; // Outer angle for all ANGLE patterns float innerAngle = 1.55; // Inner angle for all ANGLE patterns vector omega = <0,0,10>; // Rotation of ANGLE patterns around the source float life = 0; // Life in seconds for the system to make particles
Good luck. First of all thank you for your reply.. that's really nice of you to give some time to a complete stranger.  i have a few technical questions..  1- integer followSource = FALSE; // Particles follow the source : how do they follow the source? do you mean if the source is moving? 2- integer followVel = FALSE; // Particles turn to velocity direction particle paramaters this is the part i am interested in.. the part that makes the particles go up then down towards the center of the object.. making it look like it's in a snow globe. i think.. lol if i set it to true.. what is the difference.. velocity direction? please expalin.  3- integer pattern = PSYS_SRC_PATTERN_EXPLODE; what is this line? 4- string texture; // Texture used for particles, default used if blank : now this one is another one i try hard to get.. how do we set the texture? do we drop the texture in the object then put the name there? example.. let's say i have a texture called snowflake.png.. so the line goes like (string texture="snowflake.png"; )?? or what?  sorry for taking too long of your time.. i will try to mess with the script now.. inworld.. and update you with my progress lol! THANK YOUUUU xD Edit.. I tried the script inworld.. I keep on having errors  
|