Blockland Forums > Suggestions & Requests

Better random brick color.

Pages: (1/1)

Dexxtter:

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.

MARBLE MAN:

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.


Xalos:


--- Quote from: MARBLE MAN on September 27, 2012, 05:31:38 PM ---The getColorIDTable(%min + getrandom(0,%diff)) is the random color value within your range.
--- End quote ---


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?

Pages: (1/1)

Go to full version