Hi everybody, hope you all are fine.
I need some help or a good idea on how to arrange a database in my game.
In my game, battles are made so that the player have to answer a question in order to play the turn, otherwise it will be blocked until next turn/question.
I stored all the questions in a "Question Database Common Event", called during battles. In detail, at the beginning of the game a "Question Variable" is set to 1; then, during battles, the "Question Database Common Event" is called, in it the questions are packed in "If... then" statements, so that If [Question Variable] is 1 then the first question appears. At the end of the turn, a +1 is added to the "Question Variable", so the next turn the question will be the number 2, and so on. (Hope the explanation is understandable).
What I want is to shuffle the question order in different games: I don't want the game to repeat the same identical question order. I could use random numbers, but there is the risk to have a question repeated many times, and I want to avoid that, too.
Is there a possibility to use a random-variable system, but excluding the numbers/questions already used? Like storing them in an array, and subtracting them to the numbers that can be selected?
I thought of this during the last days, but couldn't find a way to do that, so here I am.
Any suggestion?
Thanks in advice, and greetings from Italy
I need some help or a good idea on how to arrange a database in my game.
In my game, battles are made so that the player have to answer a question in order to play the turn, otherwise it will be blocked until next turn/question.
I stored all the questions in a "Question Database Common Event", called during battles. In detail, at the beginning of the game a "Question Variable" is set to 1; then, during battles, the "Question Database Common Event" is called, in it the questions are packed in "If... then" statements, so that If [Question Variable] is 1 then the first question appears. At the end of the turn, a +1 is added to the "Question Variable", so the next turn the question will be the number 2, and so on. (Hope the explanation is understandable).
What I want is to shuffle the question order in different games: I don't want the game to repeat the same identical question order. I could use random numbers, but there is the risk to have a question repeated many times, and I want to avoid that, too.
Is there a possibility to use a random-variable system, but excluding the numbers/questions already used? Like storing them in an array, and subtracting them to the numbers that can be selected?
I thought of this during the last days, but couldn't find a way to do that, so here I am.
Any suggestion?
Thanks in advice, and greetings from Italy