Game Development Community

Random Number

by Brock Ferguson · in Technical Issues · 10/18/2001 (1:19 pm) · 2 replies

Is there any way to randomly take a number between (and including) 1 and 5 and set it in place of a global integer called 'osamay' which already has a value? I am coding a little battleship-like game and am stumped of how to randomly put someone on a 5 x 5 grid :) I really only need to know how to get a random number of anything and I can code the rest.