C
Cupid Stunt
Guest
I have a small bit of code:
If I place it in the Game Start event of an object it works as expected.
However, if I place it in Step event in the same object, it behaves slightly differently and leaves a gap above the bottom row.
I can't for the life of me figure out why.
Code:
if(!global.round_running) {
global.round_running = true;
global.board = ds_list_create();
for(x_index = 0; x_index < size_x; x_index += 1) {
column = ds_list_create()
for(y_index = 0; y_index < size_y; y_index += 1) {
y_pos = global.bottom - (size * y_index) - 1;
x_pos = left + (size * x_index);
ds_list_add(column, instance_create_layer(x_pos, y_pos, layer, obj_tile));
}
ds_list_add(global.board, column);
}
}
However, if I place it in Step event in the same object, it behaves slightly differently and leaves a gap above the bottom row.
I can't for the life of me figure out why.