![]() |
Clear all Layers - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Clear all Layers (/showthread.php?tid=1209) |
Clear all Layers - William - 26-08-2007 GSD tutorial for extra layers is needed, or you'll have to figure out which once you dont need. This code uses more layers than a unedited MSE1. Add a new command button to the map editor, put this in it: Code: Dim y As Long Re: Clear all Layers - Rezeyu - 26-08-2007 Isn't this the same as the "One-Button clear layer/Attribute button" tutorial that DarkX posted? EDIT: I mean, I know it's different code, your's looks alot simpler, but I meant, doesn't it do the same thing? Re: Clear all Layers - William - 26-08-2007 Dunno, guess there is a clear layer button. But I think his code removes the tiles from the option box thats checked. This will remove all the tiles, so you dont need to delete the map. Just felt like posting it ![]() Re: Clear all Layers - Dragoons Master - 26-08-2007 Just one thing for performance, replace the Code: For y = 0 To MAX_MAPY Code: If frmMapEditor.optLayers.Value = True Then Re: Clear all Layers - Matt - 26-08-2007 Dragoons Master Wrote:Just one thing for performance, replace the Does it only loop now if the option is selected? Whereas Will's method, had it looping before it checked..? Re: Clear all Layers - William - 26-08-2007 It doesnt really matter ![]() Re: Clear all Layers - Dragoons Master - 26-08-2007 Will's checks it the condition is true every time it loops, and it will always loop, no matter what. With the If before the loops it will only loop if the condition is true, and this if it made only once. |