Hello all.
I was wondering the best way to set up a random functionality. For example, I tell the program to choose a number between 0 and 3. If 0, it displays question 1, 1 displays 2, 2 shows 3, and 3 shows 4.
I have this part working, but am running into an issue with the reassignment of numbers; Once 0/question 1 is shown, 0 should then be assigned to show question 2 as well, so both 0 and 1 would show question 2. Likewise, if question 2 is shown, 1 should move to question 1, and remove from question 2 so that there is no chance of hitting the button and it not showing anything different.
I’m attaching a few screens to show an example of how I have it set up; The Event Graph section of that (the part before is just checking to ensure not the full number of questions have been shown), the Check KC1 code (which should be handling the checking and reassignment if 3 then 2 and so on are checked. I have 4 total, each with the first branch checking the one in question (so 1 checks 1 first, and so on, like 3 does below)), and the Cannot Choose code (just makes it so that the Boolean is false and attempts to reassign the number 31 to its array to ensure that it won’t be checked when I have all 30 intended questions up.).
As noted, I plan to expand to have 30 questions, but am currently just using 4 as a test. Today I also noticed that on some, if two have been shown prior, nothing will be shown/changed on the fourth selection. For example, if KC2 and KC3 are both shown and it rolls to show KC4, then no matter what it rolls, 0-4, even though 0 should still be assigned to 1, it will not show question 1.
I’m at a loss and am currently working on a little graph to try to determine any pattern, but would also appreciate any help.
Oh, and I have been asked to do this via Blueprints, if any are wondering why I don’t try via C++.