Hello,

I asked this question in the UnityAnswers section and the answer wasn’t really what I’m needing . I thought to ask it here due to the activity here versus there.

http://answers.unity3d.com/questions/29345/random-number-generation/29347#29347

Original post:

I need to randomly generate a number between 10000 and 25000, then randomly distribute the result into 10 different variables.

Anyone have any ideas on how to do this in either C# or Uscript?

Clarification post:

Maybe I wasn’t very clear on what I’m trying to do. Here’s (hopefully) a better way to describe the operation that I’m trying to achieve

Generate a random number between 10000 and 25000 (done- let’s say it’s 15000) Then; take the result (15000) and distribute it over 10 variables by random percentage Resulting in var a= 1500 (10% of total) var b= 750 (5% of total) etc. until 100% of total is reached

In this case these would all be INT values

Thanks for any replies