I want that when a box collides with an object, the box changes its color to a random color or to a list of colors. The only way is by scripts?
If you need the script here it is. I have not investigated how to do it with BB nodes. Here is the random integer function: function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min + 1) ) + min; } Then here is how to change the object: this.entity().setColor(getRndInteger(256, 0),getRndInteger(256, 0),getRndInteger(256, 0));
Thanks for script rob, but what if a want to get a random selection from a range of colors, let's say i want to randomly choose from these colors in RGB (256,12,25),(52,123,53), etc. How can I do that?