Game Development Reference
In-Depth Information
Setting data and adding variables
It should be noted that you can add an instance or local variables to the array as well. For
the most part, this is not usually done; but in certain circumstances, such as when assigning
different arrays to different objects, this can be useful.
One of the most important tasks you need to do with arrays is to set and search for data.
Let's go ahead and set the first cell to number 9 . Click on Add action and set X to 0 and
Value to 9 , as shown in the following screenshot:
Once you have done that, click on Done . Your project should look something like the fol-
lowing screenshot:
This means that the first cell is set to a value of 9 . Remember that 0 is, in fact, the first cell
and that cell 1 is the second cell. The array should look like this:
Search WWH ::




Custom Search