Is it possible to CHOOSE a random number between 3 numbers I have set?
I want to randomly choose between -3, 0, 3 but only those exact three numbers.
I want my enemies to randomly spawn in one of the three lanes (x=-3/0/3). I am familiar with the Random.Range command but I am not sure I can force it to choose. Thanks in advance!
Put the 3 numbers in an array. Then use Random.Range(0, 3) to select 0, 1, or 2 (the maximum ‘3’ is excluded). Use the random result as the index of the array.