Daniel Mallett
Member
for(j = 0; j < obj_grid.hard_y_limit; j++)
{
for(i = 0; i < obj_grid.hard_x_limit; i++)
{
temp = ds_grid_get(obj_place.collide_grid_tile, i, j);
temp1 = ds_grid_get(obj_place.danger_grid_tile, i, j);
tilemap_set("lyr_collide", temp, i, j);
tilemap_set("lyr_danger", temp1, i, j);
}
}
The code posted above is supposed to loop through a ds_grid and set the tilemap to that. But It seems only seems to take notice of the second map. If I comment out either line they both work, but not together.
If I change the second line to tilemap_set("lyr_danger", 1, 0, 0); The first line will work and the second line will set a specific tile in a specified place as stated and the whole thing 'works' fine.
I thought it may be overwriting somehow but this is not the case. Hence temp and temp 1 for the different map data.
Any advice once again most appreciated.
{
for(i = 0; i < obj_grid.hard_x_limit; i++)
{
temp = ds_grid_get(obj_place.collide_grid_tile, i, j);
temp1 = ds_grid_get(obj_place.danger_grid_tile, i, j);
tilemap_set("lyr_collide", temp, i, j);
tilemap_set("lyr_danger", temp1, i, j);
}
}
The code posted above is supposed to loop through a ds_grid and set the tilemap to that. But It seems only seems to take notice of the second map. If I comment out either line they both work, but not together.
If I change the second line to tilemap_set("lyr_danger", 1, 0, 0); The first line will work and the second line will set a specific tile in a specified place as stated and the whole thing 'works' fine.
I thought it may be overwriting somehow but this is not the case. Hence temp and temp 1 for the different map data.
Any advice once again most appreciated.