How can I use a table name as a variable
Maybe someone of you knows how to do this.
I got multiple levels/scenes.
Each is loading data from the related table. Example Level 1 -> Data from TB-Level1
Problem:
I got thousands of rules loading from that one Table and this would require me to go through each rule and change the table to the current level.
What am I looking for:
I want to have one attribute which I give the important table reference too.
And in all other rules it uses this attribute.
Example:
change attribute self.currentleveltable to TB-Level1
tableCellValue( self.currentleveltable,1,1)
But this does not work for text,int or index variable types
Any idea?
Comments
Here my test setup

My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Im not sure if I understand you correctly, but do you want to transfer all the table data to one single attribute?
@Approw
Only the reference - the name of the table
so i can use it in all conditions
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
I think I understand what you want. I don't have GS anymore but I think this should work.
Just create the tables which contain the level preferences/properties or whatever is in there. These are the Level[..]Master tables.
Then create one table with maxed out cells and columns, lets call this one "LevelLoader".
Then, if the level is 1. Copy the Level[1]Master table to the LevelLoader table.
Now you can change all the attributes to the LevelLoader table, which I think should solve your bottleneck:D
@Approw
Exactttllyy what I want!!
Thanks man!
PS:
Tested works!
Current level table maxed out with rows/Cells
loads the relevant level table over it
Bam!
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
@BigDave Awesome, glad I could help:)!