22.09.2012, 04:53
Hey everyone. I'm trying to make a quiz system, based on dialogs, but I'm kinda stuck. So, what I'm trying to achieve, is a set of questions (let's say 50 questions in total) with 4 answers, from which only 1 answer is correct.
Now, from those 50 questions, I want a quiz with only 20 questions, which are randomly selected from all those 50 questions. The quiz will only 'pop' when the player first registers on the server.
The thing is I don't know how to randomly select questions and check if the answer is correct.
Another thing, I want the answer orders to change. Let me give you an example, so you can understand better:
Question 1: How many apples I have?
Answers: a) 1; b) 5; c) 10; d) 20 (correct answer is c) 10)
The correct answer is 10. I want it to randomly change it's "position". At the next player, I want the answers to change, like:
Question 1: How many apples I have?
Answers: a) 10; b) 20; c) 5; d) 1 (correct answer is a) 10)
Now, from those 50 questions, I want a quiz with only 20 questions, which are randomly selected from all those 50 questions. The quiz will only 'pop' when the player first registers on the server.
The thing is I don't know how to randomly select questions and check if the answer is correct.
Another thing, I want the answer orders to change. Let me give you an example, so you can understand better:
Question 1: How many apples I have?
Answers: a) 1; b) 5; c) 10; d) 20 (correct answer is c) 10)
The correct answer is 10. I want it to randomly change it's "position". At the next player, I want the answers to change, like:
Question 1: How many apples I have?
Answers: a) 10; b) 20; c) 5; d) 1 (correct answer is a) 10)