Author Topic: Is there a console command to change all bricks of one color to the other?  (Read 689 times)

I am looking for a console command that can change all bricks of a color , in this case yellow , to a goldish color.
Is there a console command for that?

You could just use Fillcan.

They aren't all connected.

In the meanwhile waiting to get a response you could paint around 7000 bricks without fillcan.

1. Make a color set with only one color
2. Use it
3. Load the bricks
4. Save the bricks
5. Use other color set
6. Load the bricks
7. ???
8. Profit

1. Make a color set with only one color
2. Use it
3. Load the bricks
4. Save the bricks
5. Use other color set
6. Load the bricks
7. ???
8. Profit

Some people just can't read damn topics, can't they?

Some people just can't read damn topics, can't they?
I'm offering a solution. To my knowledge there is no such console command.

There is no console command to do this. Even if there was, it would be easy to abuse. (Example: Someone tries to recolor 20,000 bricks at the same time, causing a crash)

%bg = findClientByName("TheArmyGuy").brickGroup; for(%i=0;%i<%bg.getCount();%i++){%bg.getObject(%i).setColor(1);}

Change the color number (1) with the color number in your colorset.

I have a feeling that changes all bricks to that color.
I just want to chaneg yellow bricks to that color.
I'll try it nevertheless.

Maybe you should try this:

Code: [Select]
for(%i=0;%i<findClientByName("TheArmyGuy").brickGroup.getCount();%i++) if(%findClientByName("TheArmyGuy").brickGroup.getObject(%i).color == 1) findClientByName("TheArmyGuy").brickGroup.getObject(%i).setColor(0);

That should set all red bricks to yellow.