Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | stevepetoskey |
So I know how to get random numbers, but I am having a problem, I am trying to get random numbers out of a dictionary. Like this:
Var randDictionary = {1:rand_range(0,2)}
func getRand():
Randomize()
var Num = randDictionary[1]
how ever it returns the same number every time. Is there a better way to do this? If not I was thinking of having a array inside that dictionary that holds the random ranges and the function calls that, would that be the best way to do it?
It depends, are you trying to get a random number or a random number from a predefined set(like from a predefined set of numbers {0,5,8,13,15,16} )?
rustyStriker | 2020-05-03 16:21