Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

contantly changing color particle effect

Punklord Drago
Registered User
Join date: 8 Sep 2004
Posts: 22
10-29-2004 15:44
I know it can been done, but dont know how. I want my particles to change from one color to another to another to another and so forth and so on. example from red to blue to ornage to yellow to green to purple to black, ect. like the random cycles colors for a prim, but for particles. iknow it can be done like i said i have seen it. any that can help please do, been racking my brain on this one..
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
10-29-2004 15:53
i guess something like...
CODE
default {
state_entry() {
llSetTimerEvent(1.0);
}

timer() {
vector color = // stuff to get your color vector goes here.
llParticleSystem([
PSYS_PART_FLAGS, PSYS_PART_INTERP_COLOR_MASK,
PSYS_PART_START_COLOR, color,
// rest of the particle system
]);
}
}
i hear that this is pretty hard on a sim though so if you get in trouble, i never heard of you. :D
Mirrandor Huber
That one guy
Join date: 3 Jul 2004
Posts: 7
06-23-2005 16:43
Ok, I'm working on something similar to this now. How would I incorporate something like that into my script. I.E. Where to put it? I have tried putting it into the script I've written in different location but this script doesn't work.

Apparently while being happy I found a script that was what I looking for, I overlooked the date. Was the function code listed here changed in a recent LSL update? And if so, would anyone be able to explain how to go about making a color changing particle script? This is aside from the beginning color to ending color shifts.
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
06-23-2005 20:59
From: Mirrandor Huber
Ok, I'm working on something similar to this now. How would I incorporate something like that into my script. I.E. Where to put it? I have tried putting it into the script I've written in different location but this script doesn't work.

Apparently while being happy I found a script that was what I looking for, I overlooked the date. Was the function code listed here changed in a recent LSL update? And if so, would anyone be able to explain how to go about making a color changing particle script? This is aside from the beginning color to ending color shifts.
No, llParticleSystem is the same now as it was then. Zuzi's example would need something to generate a new colour. llFrand would work if you wanted to randomly generate them. (You'd want to define a vector, named "color", for example, then do "color.x = llFrand(1.0);" for the x, y and z components of the vector.

Though in terms of colour selection, you probably don't want it to be random... most colours are ugly. You could have a list of predefined colours, either cycling through them, or using llListRandomize to randomize the list, then selecting the first element.

You need to decide if that one-second timer is really what you want. The effect may not be what you're after, and that frequent a timer can be hard on the sim, depending on what's happening there.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog