Author Topic: How would I make this have a random color for each particle?  (Read 599 times)


I'm wondering how to make this use random colors for each particle that comes out.

I'll start by saying I don't know

but you probably meant
base/client/ui/... (not base/data/client/...)

and I'm wondering what you have against
dragCoefficient = 0.1;

I'll start by saying I don't know
:(
but you probably meant
base/client/ui/... (not base/data/client/...)
oh yes thanks
and I'm wondering what you have against
dragCoefficient = 0.1;
im just editing an add-on so im wondering what who-ever-that-guy-was has against it

Back in the RTB 1.x days, Bleh had a way to randomize particle colors
Code: [Select]
colors[0] = getrandom(0,1000) / 1000 SPC getrandom(0,1000) / 1000 SPC getrandom(0,1000) / 1000 @ " 0.500";
colors[1] = getrandom(0,1000) / 1000 SPC getrandom(0,1000) / 1000 SPC getrandom(0,1000) / 1000 @ " 0.0";

But the randomized colors only change every time you either re-execute the file, or restarted your server

Maybe there's a script you can do that would randomize the RGB values
« Last Edit: May 04, 2016, 09:13:30 PM by Masterlegodude »

Change these
colors[0] = "R G B A";
colors[1] = "R G B A";
colors[2] = "R G B A";


A float from 0.0 to 1.0.



You can't make it completely random (correct me if I am wrong) because they are datablocks, you could be able to do it but that would require executing the file and transmitting datablocks every time you do it (plus every client will see the same thing) but you can try to make each color change during the loop
colors[0] = "1 0 0 1";
colors[1] = "0 1 0 1";
colors[2] = "0 0 1 1";

colors[0] = "1 0 0 1";
colors[1] = "0 1 0 1";
colors[2] = "0 0 1 1";

I guess I'll do this, but I'll leave it unlocked if someone can figure something out.

I'm also not sure about this but I think you can do more than 3 colors, but I don't know the max amount of colors you can do

I'm also not sure about this but I think you can do more than 3 colors, but I don't know the max amount of colors you can do
I think it can only go up to 4, according to this
http://docs.garagegames.com/tge/official/content/documentation/Reference/Console%20Objects/Torque_Console_Objects_7.html#ParticleData_.28PD.29
« Last Edit: May 04, 2016, 09:27:12 PM by Masterlegodude »