Here is the code I have until now. Apart I have been trying to also dived it in to stages like the way we learnt last week in class, but that will still have more work to do because I need to get first my arrays in order of the texts to come out.
I got to made it able that it changes to other text when clicked but somehow even though i have two forms of doing it, in one it goes from text 1 to text 6,7,8 while in the other form i only get to go from text 1 to 2,3 and 4. but then later goes into nothing more.
Code:
int state;
String text1="Hello!";
String text2="...";
String text3="Hello~";
String text4="Did i catch you attention?";
String text5="Are you male or female?";
String text6="Male";
String text7="Female!";
String text8="None of the above";
String text9="Did you know that everyone shares something in common?";
String text10="All are humans";
String text11="Do you live or exist?";
String text12="Live";
String text13="Exist";
String text14="Live is being in the moment here and now";
String text15="Even if you exist will not have any meaning if you don't live";
String text16="So I propose you to do some challenge";
String text17="Light your own star of life";
String text18="This will consist in three challenges related to 3 colours that combined together will light your star";
String text19="Red";
String text20="Try to find someone who have something red and show it to the screen";
String text21="Blue";
String text22="Try to find someone who have something blue and show it to the screen";
String text23="Green";
String text24="Try to find someone who have something green and show it to the screen";
String text25= "Now all the colours put together creates a light";
String text26="And with the light the star will shine";
String[] questions;
boolean[] picked;
int picked_count = 0;
int value = 0;
void setup() {
size(1000, 1000);
state = 0;
}
void draw() {
background(20);
if (state == 0) {
text (text1, 500,400);
textSize (45);
textAlign(CENTER);
tint(value);
text(text1,0,0);;
}
if (state == 1) {
text (text2,500,300);
textSize (45);
text(text3,500,400);
textSize (20);
textAlign(CENTER);
}
if (state == 2) {
text (text4,500,300);
textSize (20);
textAlign(CENTER);
}
if (state == 3) {
text (text5,500,300);
textSize (20);
textAlign(CENTER);}
if (state == 4) {
text (text6,500,200);
text(text7,500,300);
text(text8,500,400);
textSize (20);
textAlign(CENTER);}
if (state == 5) {
text (text9,500,200);
textSize (20);
textAlign(CENTER);}
if (state == 6) {
text (text10,500,200);
textSize (20);
textAlign(CENTER);}
if (state == 7) {
text (text11,500,200);
textSize (20);
textAlign(CENTER);}
if (state == 8) {
text (text12,500,200);
text (text13,500,300);
textSize (20);
textAlign(CENTER);}
if (state == 9) {
text (text14,500,200);
textSize (20);
textAlign(CENTER);}
if (state == 10) {
text (text15,500,200);
textSize (20);
textAlign(CENTER);}
if (state == 11) {
text (text16,500,200);
text (text17,500,300);
textSize (20);
textAlign(CENTER);}
if (state == 12) {
text (text18,500,200);
textSize (15);}
}
void mousePressed() {
state++;
if (state == 0) {
state = 1; }
if (state == 1) {
state = 2;}
if (mouseX>700 && mouseX<500 && mouseY>400 && mouseY<200){state = 2;}
if (state == 2) {
state = 3;}
if (state == 3) {
state = 4;}
if (state == 4) {
state = 5;}
if (state == 5) {
state = 6;}
if (state == 6) {
state = 7;}
if (state == 7) {
state = 8;}
if (state == 8) {
state = 9;}
if (state == 9) {
state = 10;}
if (state == 10) {
state = 11;}
if (state == 11) {
state = 12;}
}
//void mousePressed() {
// state++;
// if (state == 2) {
// state = 3;
// }
// if (state == 3) {
// state = 4;
// }
//if (state == 4) {
// state = 5;
// }