Hello, I’d like to accomplish this: when I press a key I want to print one random array element picked from 5 items without repetition, and after all five elements are printed (after I press the key five times) I want to stop printing anything.
Get Array → Shuffle → Print the first 5 by increasing iterator by one each time.
I set it up like this which prints five elements at once, but I have absolutely no idea how:
- print only one element
- subtract the ones already picked
You can acctually do it like this - no idea if thats the best way to do it but it works…
By pressing M It print string once one of each array index element so i can press it 5 times and it print string the 5 different values everytime “random” then nothing happens after pressing it again… If i repeat it again by starting a new game it gets random array element each time and it stop after 5 times pressing the key… If thats what you try to achieve this may work for you. (You will have to push each array index element 1 by 1 but it will print string the value behind your array index number)
This is absolutely brilliant, thank you so much!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.