0

I have a script that randomly puts image art layers together and generates them, there are multiple races in the script for example a cat and a dog so their image layers dont get mixed together. Now what I want to achieve is having the races randomly generated but with some kind of weighing like for example 70% should be race 1 and 30% should be race 2.

For example right now it generates it like this: First it generates 50 of race 1 and then generates 50 of race 2, I would like it so it randomly switching back and forth between the races while still having certain percentages set. https://github.com/HashLips/nerdy_coder_clones_tutorial/blob/main/generative-art-opensource/index.js

  • Hi Franco, please can you put a [mre] in your question? See [ask] for more information. – Tim Sep 15 '21 at 16:25
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 22 '21 at 06:54

0 Answers0