N
NotMe
Guest
I got this code
///Setting up the level
// Set the grid width and height
var width = room_width div CELL_WIDTH;
var height = room_height div CELL_HEIGHT;
// Create the grid
grid = ds_grid_create(width, height);
// Fill the grid with the void
ds_grid_set_region(grid, 0, 0, width, height, VOID);
for(var yy = 0; yy < height; yy++) {
for(var xx = 0; yy < height; xx++) {
if(tile_layer_find(10000000, xx, yy) != -1) {
grid[# xx, yy] = WALL;
}
}
}
for(var yy = 0; yy < height-1; yy++) {
for(var xx = 0; yy < height-1; xx++) {
if(grid[# xx, yy] == WALL) {
instance_create(xx, yy, obj_wall);
}
}
}
to setup the walls
but the game wont run because there's an infinite loop that i cant fine
thanks if u can help me
///Setting up the level
// Set the grid width and height
var width = room_width div CELL_WIDTH;
var height = room_height div CELL_HEIGHT;
// Create the grid
grid = ds_grid_create(width, height);
// Fill the grid with the void
ds_grid_set_region(grid, 0, 0, width, height, VOID);
for(var yy = 0; yy < height; yy++) {
for(var xx = 0; yy < height; xx++) {
if(tile_layer_find(10000000, xx, yy) != -1) {
grid[# xx, yy] = WALL;
}
}
}
for(var yy = 0; yy < height-1; yy++) {
for(var xx = 0; yy < height-1; xx++) {
if(grid[# xx, yy] == WALL) {
instance_create(xx, yy, obj_wall);
}
}
}
to setup the walls
but the game wont run because there's an infinite loop that i cant fine
thanks if u can help me