Ogmo extract map size [SOLVED]


(Jean) #1

So, extracting all the data of the tiles and identity is OK, but I don’t want to have to in every world of my game to manually specify the size of the map on my Tilemap. The tile size is ok, I have only one tileset so it’s a constant final on my .as files.

But I can’t get to work to read the first line of the xml file, to get both atributes of Height and Width.


(Bora Kasap) #2

if this is your way to get your ogmo file

_levelxml = FP.getXML(level);

then you can get width and height like that

_width = int(_levelxml.@width);
_height = int(_levelxml.@height);

(christopf) #3

Additionally you can give this video by zach a chance. Gave me all information i needed so far (as what @AlobarNon mentioned).