Table name problem in tableCellValue

ChunkypixelsChunkypixels Member Posts: 1,114
edited November 2015 in Working with GS (Mac)

So I'm working on building a 3D dungeon system, using tables to store the layout of each dungeon level.

each level table is called:
TableDungeon1
TableDungeon2
TableDungeon3
...etc

I have a game attribute (index) called DungeonLevel that I'm using to keep track of which level is currently in play.

I want to get positional information for a number of actors from a table cell value by using the following:

constrain (actor attribute) to tableCellValue(("TableDungeon"..(game.DungeonLevel)),row,col)

The bit ("TableDungeon"..(game.DungeonLevel)) where Im trying to create the table name just doesn't seem to want to work. It works fine if I specifically set the table individually from the drop down Expression Editor, but not when I'm trying to build it based on the DungeonLevel attribute. Am I simply not getting my syntax correct?

I need to do it this way so I can set up 88 actors once... to pull information from different tables... rather than having to reset them up every time a new level (table) is used...

...any thoughts or input that can put me on the right track would be appreciated.

cheers...

Comments

Sign In or Register to comment.