View Single Post
  #1  
Old 10-11-2013, 12:40 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Getting all layers and Saving the level

I'm trying to get all the layers of a level and save as an image. I can get a specific layer just fine, but trying to get them all on one image seems to have stumped me. If I take out the temp.r loop, change the @= for temp.tile to just =, and set tilelayers[0] then it works fine one 1 layer. I know I'm just doing this wrong probably, but if it's even possible I can't wrap my head on how to do it. Using dustys TileLayers script btw.

PHP Code:
for (temp.0temp.64temp.i++) { 
  for (
temp.0temp.64temp.k++) {
    
temp.tilex i;
    
temp.tiley k;
        
    for (
temp.0temp.6temp.r++) {
      
temp.tile @= tilelayers[r].tiles[temp.tilextemp.tiley]; 
      
temp.imagetile TilesToImage(temp.tile);
    }
    
temp.tilesetImage "roak_tileset_gmap_overworld.png"
     
    
this.levelImg.drawimagestretched(16161616temp.tilesetImagetemp.imagetile[0], temp.imagetile[1], 1616);
  }

(I started out using it in the control, but it just wouldn't work, so I had to put the control in a var)

I also might as well ask how to do this with a gmap instead of just one level as well, obviously I'm trying to just draw out the map per the levels and layers.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote