tophe 69 Posted February 24, 2007 I want to do a variable that has to have a number between 175580 and 175591. But the command Random always start at 0. I would like something like X = RANDOM 175580 to 175591 I hope you understand my point. How could I do this? Share this post Link to post Share on other sites
akm74 1 Posted February 24, 2007 try to use (RANDOM 11) + 175580 Share this post Link to post Share on other sites
dr_eyeball 16 Posted February 24, 2007 _x1 = 175580; _x2 = 175591; _number = floor random (_x2-_x1+1) + _x1; or _number = floor random (175591-175580+1) + 175580; Share this post Link to post Share on other sites
tophe 69 Posted February 24, 2007 Thanks guys! It seems to me that (RANDOM 11) + 175580 is pretty much the same as _number = floor random (_x2-_x1+1) + _x1; Or maybe _number = floor random (175591-175580+1) + 175580; could be written _number = floor random (12) + 175580; Anyway. You helped alot. Now I can use this for randomizing a destroyed fence in a camp. Or to exclude certain buildingpositions when randomizing where to put units. Share this post Link to post Share on other sites