hey. im new to SL and the forums.
im trying to make a script that will allow the particles to change colour on a timer with llSetColor. but im not sure how to incorporate it or even if its possible. any help wold be apreciated, thanks
These forums are CLOSED. Please visit the new forums HERE
help with particles |
|
|
Angus Romeo
Registered User
Join date: 21 Jul 2006
Posts: 1
|
08-01-2006 07:19
hey. im new to SL and the forums.
im trying to make a script that will allow the particles to change colour on a timer with llSetColor. but im not sure how to incorporate it or even if its possible. any help wold be apreciated, thanks |
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
08-01-2006 08:40
Welcome to the fora and SL.
llSetColor isn't the right call. If you're ok with particles already you'll see there is a particle colour flag (two actually). Your timer() event should call the particle system afresh each time, with new values for the PSYS_PART_START_COLOR item. You can also make the particles change colour over their lifetime by setting the PSYS_PART_INTERP_COLOR_MASK flag which will let you bring the PSYS_PART_END_COLOR value into use. _____________________
|
|
Steamer Stanley
Registered User
Join date: 19 Jul 2006
Posts: 3
|
timer
08-01-2006 08:49
hey. im new to SL and the forums. im trying to make a script that will allow the particles to change colour on a timer with llSetColor. but im not sure how to incorporate it or even if its possible. any help wold be apreciated, thanks default { state_entry() { llSetTimerEvent(1.0); // generate a timer event every 1 second } timer() { llSetColor(<llFrand(1.0),llFrand(1.0),llFrand(1.0)>,ALL_SIDES); // set a random color } } Hi Angus I found it here, with more examples and coments. Hope it helps.http://secondlife.com/badgeo/wakka.php?wakka=timer |
|
Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
|
08-01-2006 08:54
default { state_entry() { llSetTimerEvent(1.0); // generate a timer event every 1 second } timer() { llSetColor(<llFrand(1.0),llFrand(1.0),llFrand(1.0)>,ALL_SIDES); // set a random color } } Hi Angus I found it here, with more examples and coments. Hope it helps.http://secondlife.com/badgeo/wakka.php?wakka=timer ...this won't help him with particles. The script you provided changes the color of the prim. |
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
08-01-2006 09:16
I have a particle script I wrote for a ship of mine that allows it to change colors off a menu in the root.
Basically I just have the script set to receive link messages and when it receives the name of pre-set colors, it sets the BEGIN and END colors in the particle parameters to set values and restarts the particles. Like for pink it has BEGIN <255,0,0> and END <255,255,255> so that it transitions from red to white and results in it being pink through most of the particle (this is just with the default particle of course...no texture) |
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
08-01-2006 09:20
You need to use the llParticleSystem() function to change particle colors, not llSetColor()....
If you want a combination of multiple colors you're better off using a few prims each with their own particles defined with different colors. Using a timer to change particle colors is 'icky'. (using short timer intervals to re-define the particle display can contribute to lag) _____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources.
Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas. - Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store! |