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.
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.
Torque 3D Owner Rodney Rindels - Torqued
Divide By Zero
Btw You should be able to say this ..
myTilemap.deleteTileLayerId(%tileLayer);
The reference doco, mentions being able to remove with that.