Well, I don't think you got what I mean from the title so I will explain a little bit:
I am trying to learn how to make isometric game, I used Shaun Spaldings tutorials and even added the object moving to grid working properly BUT my grid, made with tilemap works strangely because it marks the tile I press with my button as the one out of range while for real it is my first grid. So to be clear tile with [0,0] coordiantes in grid is treated as [-1,-1] by gameMaker. Here are some more details:
code for creating grid:
And screenshots with the mistake itself and everything else:
So you may see that it reports the left top corner tile as the [-1,-1] coordiantes. Help me plaese, I don't know where can the mistake be or why does it happen. Write here please if you need any other information.
I am trying to learn how to make isometric game, I used Shaun Spaldings tutorials and even added the object moving to grid working properly BUT my grid, made with tilemap works strangely because it marks the tile I press with my button as the one out of range while for real it is my first grid. So to be clear tile with [0,0] coordiantes in grid is treated as [-1,-1] by gameMaker. Here are some more details:
code for creating grid:
GML:
layer_set_visible("Map",false);
global.theMap=ds_grid_create(MAP_W,MAP_H);
var tileMap=layer_tilemap_get_id("Map");
for(var tX = 0; tX <= MAP_W;tX++)
{
for(var tY = 0;tY <= MAP_H; tY++)
{
var tileMap_data = tilemap_get(tileMap,tX,tY);
//Format: [Sprite,Z]
var thisTile = [-1,0];
thisTile[TILE.SPRITE_FRAME]=tileMap_data;
thisTile[TILE.Z]=0;
global.theMap[# tX,tY]=thisTile;
}
}
So you may see that it reports the left top corner tile as the [-1,-1] coordiantes. Help me plaese, I don't know where can the mistake be or why does it happen. Write here please if you need any other information.
Attachments
-
139.7 KB Views: 9
-
97 KB Views: 17
-
111.9 KB Views: 20
-
111.7 KB Views: 19