PDA

View Full Version : gmap's with multiple tile sets...?


scriptless
10-15-2014, 01:31 AM
Okay so I have a gmap, and I set a default tile set for all levels. I set all levels with another prefix to use a different. But when I enter the second level, it changes tile set for both levels. Like the level I am in, and the other levels around it also show using that tile set. Is there any way to prevent this behavior?

removetiledefs("");

// Set our overworld's tileset
addtiledef("other_tiles.png", "", 0);
addtiledef("pics1.png", "vol", 0);

When I am in any level vol I see pics1.png and while standing in the level all levels that should be using the other tiles look like pics1.png until I enter those levels. :(

Jakov_the_Jakovasaur
10-15-2014, 05:02 AM
its an age old limitation, most recently mentioned here - http://forums.graalonline.com/forums/showthread.php?p=1728685#post1728685

one possible way around it depending on the amount of tile differences is to use addtiledef2() on the entire gmap

Crow
10-15-2014, 05:07 AM
addTileDef2() is preferred here. You'll just have to make sure that your differences in tiles are not overlapping with nearby levels, and then add the required rules to neighboring levels as well.

scriptless
10-15-2014, 08:23 PM
What do you mean by overlaping? I'll look into it when I get home. Thanks for the point in the right direction. :)

Elk
10-16-2014, 05:30 AM
youll most likely have to put the script and level definitions in a global weapon that the player has, something like -Environment or -System, whichever

easier control over things

the tileset overlaps because it saves unneccessary resources i think, this wasnt considered when it was programmed and superhighresolutions didnt exist...maybe

Crow
10-16-2014, 05:55 AM
What do you mean by overlaping? I'll look into it when I get home. Thanks for the point in the right direction. :)

addTileDef2() is for replacing small parts of the tileset, not the whole tileset at once. Let's say you have a base set. Then there's a specific subset of 100 tiles you need in a certain level, but not anywhere else. In a level next to that, there's 50 different tiles you only need in that level. First off, you'll need to make use of addTileDef2() in the surrounding 8 levels of both the first and second level as well. This includes the second level for the first level's tiles, and the first level for the second level's tiles; so you will have to make sure that those 100 tiles do not overlap the 50 tiles of the second level, and vice versa.