does this work for choosing a random item in a list then removing it then choosing again
does this make it so when i choose a 2nd time i cant get the number i removed
5 Replies
is this unity? if so, according to the https://docs.unity3d.com/ScriptReference/Random.Range.html page this function doesn't work the way you think it does
Random.Range generates a number using a min and max bound, it doesn't select numbers out of a list
I think it still do what he is trying to do
this might give u the same number u removed for the first time
not entirely true
spawnInts[0], spawnInts.Count
unless that value at spawnInts[0]
is always 0, this wont do whats expectedso my understanding of this post is:
@yeetyoottoot wants to pick a number from an existing list of numbers
Random.Range generates a floating point number between two numbers
so, this is not the correct api to use for that