Forum Discussion
Random Questions
I have developed a snake and ladder game and 1 question bank containing 45 question. When the dice lands on a number it jumps to question bank and user answer and jumps back to the game. Now the issue arise when user roll the dice again and it jumps to the question bank the same question is being repeated and another random question is not showing. How do i resolve this.
3 Replies
- PhilMayorSuper Hero
I believe the issue is that you are not resetting the question bank, If the question bank is set to one question, the randomisation takes place an then it will continue to show the same question. I think you need to assign it to a results slide and then reset that to get it to pull a different question.
- AndrewBlemings-Community Member
I agree with Elizabeth. The built-in question banks are very specialized in what they do. When I've needed more control over which questions are served to learners, such as a variable number of questions or removing correctly answered questions from a rotation, I've ended up creating my own logic with JavaScript to "roll" a slide from the available ones and then send the learner to it with a trigger.
There isn't really a good way to tell a question bank not to use a question once it already has. I would break the question bank up into multiple banks depending on how many questions you plan to ask in the game! For example, if you have 9 questions you want to ask, create 9 banks of 5 questions each, then do unique draws at each stop of the game.
Related Content
- 11 months ago