Start with an empty list at the beginning of the game:
Code:
global.destroyed_blocks = ds_list_create();
Then in the Destroy event of blocks, add its coordinates and
object_index to the list as an array:
Code:
var entry = array_create(3);
entry[0] = x;
entry[1] = y;
entry[2] = object_index;
ds_list_add(global.destroyed_blocks, entry);
When the ball goes off the screen, loop through that list and recreate the instances as listed and clear the list (make sure NOT to trigger this continuously):
Code:
for (var i = ds_list_size(global.destroyed_blocks)-1; i >= 0; i--) {
var entry = global.destroyed_blocks[| i];
instance_create(entry[0], entry[1], entry[2]);
}
ds_list_clear(global.destroyed_blocks);
Remember to call
ds_list_clear(global.destroyed_blocks); to wipe the list whenever the currently remembered blocks no longer apply (e.g. when starting a new level).