You'll most likely be using arrays for your questions and answers. If any of what I'm about to mention looks confusing, I highly suggest you research arrays and condition statements.
Manual References:
Arrays
Expressions
Strings
For example:
//positive question
positiveQ[0] = "This is positive question 1.";
positiveQ[1] = "This is positive question 2.";
//negative question
negativeQ[0] = "This is negative question 1.";
negativeQ[1] = "This is negative question 2.";
You'll also want to use arrays for the player's choice.
//positive answer
postiveA[0] = "This is a positive answer.";
//negative answer
negativeA[0] = "This is a negative answer.";
You'll need to assign a global variable for the controller. Like:
global.checkController = 0;
If the player chooses a positive answer, you'll increase the global controller += 1. If it's a negative, decrease the global controller by -= 1.
Set up condition statements if the global controller reaches a certain value, and then display the arrays using the draw event.
I was doing some coding to try and grasp on what I'm talking about. It's not fully functional code but it'll give you an example:
Create Event:
Code:
questionCheck = false;
answerCheck = false;
intraction = false;
positiveQuestion = false;
negativeQuestion = false;
global.checkController = 0;
maxPositive = 10;
maxNegative = 0
qPositiveVar = 0;
maxQPosVar = 1;
positiveQ[0] = "This is positive question 1.";
positiveQ[1] = "This is positive question 2.";
qNegativeVar = 0;
maxQNegVar = 1;
negativeQ[0] = "This is negative question 1.";
negativeQ[1] = "This is negative question 2.";
aPositiveVar = 0;
maxAPosVar = 0;
postiveA[0] = "This is a positive answer.";
aNegativeVar = 0;
maxANegVar = 0;
negativeA[0] = "This is a negative answer.";
playerChoice = 0;
questionChoice = 0;
Step Event:
Code:
if (global.checkController < 0)
{
global.checkController = maxNegative;
}
if (global.checkController > 10)
{
global.checkController = maxPositive;
}
if (intraction == true)
{
questionCheck = true;
}
if (questionCheck == true)
{
if (global.checkController > 0) //if positive
{
positiveQuestion = true;
negativeQuestion = false;
questionChoice = irandom(maxQPosVar); //randomly choose a number
positiveQ = [questionChoice];
answerCheck = true;
}
if (global.checkController < 10) //if negative
{
positiveQuestion = false;
negativeQuestion = true;
questionChoice = irandom(maxQNegVar); //randomly choose a number
negativeQ = [questionChoice];
answerCheck = true;
}
}
Draw Event:
Code:
if (questionCheck == true) //if we start the question sequence
{
if (positiveQuestion == true) //is positive question
{
draw_text(x-70,y-70,positiveQ[questionChoice]);
}
if (negativeQuestion == true) //is negative question
{
draw_text(x-70,y-70,negativeQ[questionChoice]);
}
}