Sorry if this is a really basic question, but I have an object that creates a random number of blocks in a grid with the following code:
randomize();
blockcount = round(random_range(5, 8));
blocks = 0;
grid = mp_grid_create(0,0, room_width/32, room_height/32, 32, 32);
while (blocks <...