So, I have an enemy, and I want to spawn that enemy in groups of 1, 2 or 3, but I want the groups of 1 to be the most common groups, and then groups of 2 a little more uncommon, and the groups of 3 to be the rarest. The final distribution would look something like this

I know how to do this for groups of maximum 3, but my maximum amount of enemies in a group is changable.

- So what I am asking is: how can I do

this for a variable amount of max

enemies, for example the max number

being 13, or 42 etc. I didn’t find

any way to manipulate Random.Range so

I get this output. Any ideeas?