Papa Doge
Member
I'm definitely scratching my head with this one and not sure why it's failing:
When I check the debug messages this works as intended until it needs to wrap to row 6 at grid position 138. It shows that 138 / 6 = 0.00 which should be resetting my x position and moving down but it's not and I'm not sure what's breaking here.
Code:
for (var l=1; l<((bc*br)+1); l++;) {
biome_grid_positions_list[| l] = [bx, by];
if (l mod bc == 0.00) {
bx = x;
by += cell_size;
show_debug_message("Wrapping here at column " + string(bc) + " and grid position " + string(l));
} else {
bx += cell_size;
}
show_debug_message("Grid position at " + string(l) + " and l mod bc is " + string(l mod bc));
}