Hi,
Sorry for the newbie question. This silly thing just bugs me and I am confused why it happens. I have a variable which randomly picks a number between 1-10. When the game starts, it has to show me which number it picked. Each time I check the console and start the game, a random number is selected twice.
So when I start the game right now, my console gives me this:
gameMode:5
gameMode:8
How is this possible? Don’t I execute this code just once?
static var gameMode : int;
function Start (){
gameMode = Random.Range(1, 10);
print ("Gamemode:" + gameMode);
}