How could I generate a random float (say between 0 and 100) where the distribtion follows a bell curve.
i.e how can I generate a random number where its more likely to fall near the centre of the distribution than anywhere else?
http://en.wikipedia.org/wiki/Normal_distribution (http://en.wikipedia.org/wiki/Normal_distribution)
You'd need to use its probability density function, which is
1 / sqrt(2*pi*sigma^2) * e^(-(x-mu)^2/(2*sigma^2))
where mu is the mean and sigma^2 is the variance. I'm sure you'll have no trouble doing this in AGS script.
This link: http://www.agner.org/random/ (http://www.agner.org/random/) may be useful. Look at the Non-uniform random number generators in C++, en open the package (http://www.agner.org/random/stocc.zip). Near the bottom of the stoc1.cpp file you'll find the (GPL licensed) code for both the normal distribution and the truncated normal distribution. Also, the process is explained in the accompanied PDF files (search for 'normal') if you're just interested in how to do it rather than the specific code.