Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Suggestions & Requests
»
Better random brick color.
« previous
next »
Print
Pages: [
1
]
Author
Topic: Better random brick color. (Read 354 times)
Dexxtter
September 27, 2012, 03:10:29 AM
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.
Ad Bot
Advertisement
MARBLE MAN
September 27, 2012, 05:31:38 PM
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
September 27, 2012, 05:37:46 PM
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.
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?
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Suggestions & Requests
»
Better random brick color.