Game Development Community

Deleting tile layers

by Jemand den es nicht gibt · in Torque Game Builder · 07/17/2006 (11:55 am) · 1 replies

Hiya!

In my game I make heavy use of dynamically created tile layers, which works great. I make a "manager" tile map that I use to create my layers.

Now, how would I go and delete single layers after a period of time? safeDelete doesn't work and just delete crashes the engine after some time. I can't use the tile map function because there is no way to find out the index of a tile layer.

Should I just create a tile map for each layer that I use? That would work but would seem a bit awkward.

#1
07/17/2006 (12:15 pm)
I reported a regarding using SimGroups with TileLayers as a bad idea. But secondarily I mentioned that we needed a way to get to the index of the tileLayer in a map.

Btw You should be able to say this ..

myTilemap.deleteTileLayerId(%tileLayer);

The reference doco, mentions being able to remove with that.