I’m trying to randomly distribute stat points when on equipment roll.
I have 4 main parameters, and I want to randomly distribute 16 stat points between them. I also don’t want to repeat my code 16 times on my own. I think it’s possible to use <<for>> looping in this case, I just don’t know how to do it right.
I have that version, but It works wrong. “range is not a function”. So I need a function, or what?
0 is 0, $statpoints is a variable with the number of stat points. My idea was to make an array from 0 to $statpoints, which is eq to 16 in this case. Because I need all 16 steps, 16points=16 steps (0,1,2,3,4,5…15,16).
Maybe I just don’t know how to make an array from 0 to variable’s value…