Author Topic: Better random brick color.  (Read 351 times)

The "Random Brick Color" option only uses the first row of colors from the colorset.

Could someone make it able to use colors within a certain range like if I wanted a chunk somewhere in the middle I could do a command like:

/colorrange firstcolor lastcolor

and it would use all colors from the "firstcolor" to "lastcolor".

If that doesn't make sense I'll try to make something visual to show you what I mean.

Here is something you might need:

function ColorRange(%cl, %min, %max) {
%diff = %max - %min;
talk(getColorIDTable(%min + getrandom(0,%diff)));
}


The getColorIDTable(%min + getrandom(0,%diff)) is the random color value within your range.

The getColorIDTable(%min + getrandom(0,%diff)) is the random color value within your range.


It is also stupid because you're deliberately putting more code into your script than is needed.

getRandom(%min, %max) returns an integer in the given range. What did you think the point of the zero was going to be?