Game Development Community

Cant change tilelayer through script??

by George Ison · in Torque Game Builder · 07/12/2012 (7:48 pm) · 0 replies

Hey folks,

We have a match 3 game in production and Im building the random board generator for the match scenes, but I have run into a bit of a snag. Forgive my ignorance here, as I cannot seem to get the tilelayers to change through script. Basically for simple testing purposes I created a tilelayer via the editor and added that layer to the scene and gave it a name of matchboard. Now in script, I should be able to change matchboards layer file via two methods, like matchboard.loadTileLayer(%layerfile) or change the matchboard.Layerfile = %layerfile variable.

This now brings me to my problem. One of our designers has created several tile layers and whenever I try to load through script one of these layers the board simply goes blank??? Is there some universal refresh via the scenegraph I need to be doing here? Using my debug info I do get a valid file name as well as a new valid id for the tilelayer, so I know its creating it. It just simply appears that its not showing it and yes it was added to the scenegraph during construction in case you are wondering.

Does anyone have any idea on this matter? Any help would be greatly appreciated...

Thanks so much.




****DISREGARD*****
Figured it out....

About the author

Love to engineer and develop just about anything. Our primary focus though is that of computer games and software tools.