Can you get a random value from an array without replacement?
If you use the "Random" node in an audio cue, there's a bool for "Randomize without replacement" which means that you'll get a random selection but once one of the wav files is chosen, it's removed from the list of available wavs until all wavs have been played.
I'm wondering if anyone knows how you would go about recreating this with the "Random Value in Range" node that you can use with an array? I've got an array of 16 items and I want to be sure that once a number has been selected, it won't be selected again until the list has been exhausted but I have no idea how to do this.
Here's my setup:
Would I create an array of integers and then somehow remove them from the array every time one is picked and then add them back in after the list is empty? Not exactly sure how to do that but I think theoretically it would work.
asked Jul 03 '17 at 01:43 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here