Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 10-11-2013, 01:09 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Wouldn't this do what you want?

PHP Code:
temp.tilesetImage "roak_tileset_gmap_overworld.png";
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);
      
this.levelImg.drawimagestretched(16161616temp.tilesetImagetemp.imagetile[0], temp.imagetile[1], 1616);
    }
  }

__________________
Quote:
Reply With Quote
  #3  
Old 10-11-2013, 02:38 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
No unfortunately, anything with the temp.r loop won't even get to the point of saving the image, probably because of the way dustys tile functions work, and his thing he made is way out of my league so if there isn't another way I suppose I'm doomed.
__________________
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
  #4  
Old 10-11-2013, 01:52 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Increase the loop limit, I.e.

maxlooplimit = 100000;

64*64*6 is 24576 which is over the 10000 limit by default.
__________________
Quote:
Reply With Quote
  #5  
Old 10-12-2013, 02:50 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
tried this.maxlooplimit = 100000; and maxlooplimit = 100000; before and, just for kicks, in the loop. Nothing.
__________________
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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.