What is an array ?
For the unitiated, an array is essentially a list of variables with a number next to it. Here are a few concrete example to clarify this concept that is often terribly explained.
Dialog System using arrays
Imagine, dialog being stored within an array. It would look like this:
text_ammount = 0;
text_box = "This text will be drawn on screen when the text_ammount variable is equals to 0";
text_box = "This text will be drawn on screen when the text_ammount variable is equals to 1";
text_box = "This text will be drawn on screen when the text_ammount variable is equals to 2";
What does this mean ?
As stated in the text boxes, we would then use a variable called "text_ammount". This variable will increment everytime we press the required button to progress the dialog.
So what you would write in your draw event is:
Now, if you are confused, let me explain it more clearly. The draw event is drawing a variable that can change. This is possible due to the fact that all variables in an array posess the same name, but a different number. What this code does is that it displays the variable's content on the screen. Everytime you press a button of your choice, the variable "text ammount" increments. Since the array number in the draw event is determined by the variable text_ammount, the text that will be displayed will be the next one.
Arrays serve as a method of scrolling through a set of variables.