Forum Discussion
Prevent a question from be randomly selected twice from a question
Hi Alex and Terry,
I ran into the same issue and came across this message board hoping for an answer. I figured out a way on my own, though it's a bit complicated. I'll explain what I did, hoping this might help answer your question. Please feel free to reach out to me with any other questions.
I'm making a Jeopardy-like game. Each category has its own question bank. I originally set it up so that each box links to its own slide that randomly pulls from its corresponding question bank. But the problem I'm having is similar to Alex's. Separate slides pulling from the same bank can result in repeating the same question.
From what I can tell, the only way to not have repeating questions is to have one slide for each category/question bank that randomly picks 4 questions from that bank. Here is the game board below. Pardon the subpar graphics. They are placeholders at the moment.
I changed the branching from each box having its own question slide to every box in a category go to the same question slide. The problem now is when I click on a question, I have to answer all 4 questions in the category before I go back to the board. I want to go back to the board after answering one question. I tried setting the branching within the questions to all jump back to the game board slide. This works for the first question in that category, but when I click on the next question in that category it takes me back to the first question and I have to click next to go to the next question. I want Storyline to click next automatically. (This is where it gets complicated)
To do that, I need each question tied to its own variable. With variables, you can create If/Then statements that can trigger different actions when you return to the same slide. For this instance, when you go to a question slide it first checks to see if the variable is true or false. The initial state of the variable is true. If it's true, nothing happens. If it's false, it auto-jumps to the next question. When you answer the question and click continue, the continue button toggles the variable to false so that when you return to the slide it will auto-jump to the next slide. You need to repeat the following process for EVERY question.
To set up a variable, go to the response layers of the question and click the new trigger button and select adjust variable. Click the "..." button to create a new variable.
Type in any name, select the True/False type, and set the initial value at true.
Now put in the settings seen above so that Storyline knows to change the variable to false when continue is clicked.
Next, make sure you place the variable trigger before the slide jump. Copy and paste this in all other response layers.
Lastly, we need to have the question slide check for this variable's value. Go to the base layer and add a new trigger to jump to next slide when timeline starts, then click "Show Conditions" and press the green plus button.
Then type in these conditions and click OK:
Tada! You should now have a working randomly selected, non-repeatable Jeopardy-like quiz game. Again, you need to set up a new variable for every question. I know it's a pain in the buns but at least now you know how to have a little more control over customizing the functionality of your courses. Let me know if you run into any snags.
Related Content
- 9 months ago
- 12 months ago