Game Development Reference
In-Depth Information
Figure 7-16. Table function
Let's examine the syntax and the outcome of each function.
tableCellValue() returns the value of a specified cell in a specified table. The
syntax is:
tableCellValue(table,row,col)
Table: The name of the table. You need to use the attribute
browser to select the table.
Row: The row number
Col: The column number
tableColCount() returns the number of columns in a specified table. The syntax
is:
tableColCount(table)
Table: The name of the table. You need to use the attribute
browser to select the table.
tableRowCount()returns the number of rows in a specified table. The syntax is:
tableRowCount(table)
Table: The name of the table. You need to use the attribute
browser to select the table.
Let's put in practice the usage of tables.
Managing Several Scenes in One Scene
Let's go through a very advanced utilization of the tables. You will do some
recycling of the actors and use tables to store the different levels of a game.
Creating Tables
You will create a table for each actor you will recycle. Basically, you will have
tables for Hard Block1, Hard Block2, Soft Block, and Target. The tables will
contain the positions of the blocks for each level. You will have two columns (X
 
Search WWH ::




Custom Search