Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
To load a level, you will create a new method for it. Depending on how the field levelNum is set, it will load a corresponding text file into a string variable. This will then be split up so we can determine the ID of each tile.
game class, called LoadLevel.Method LoadLevel:Int()
layerGame.eng.SetDefaultLayer(layerGame)
layerGame.RemoveAllObjects() crateNum = 0 onTarget = 0
String variable levelText.Local levelText:String = LoadString("level"+levelNum+".txt")