Moving blocks after clearing line - Tetris

Unpedro

Member
Hey, i'm having issues with moving the blocks down after clearing the line, here's the code of deleting an line:
GML:
for(var _y = 0; _y < 128; _y++){

    var full = true;

    for(var _x = 8; _x < 81; _x++){

        if(!instance_position(_x,_y,solid_o)){

            full = false;



            break;

        }

    }

  

    if(full) {

        for(var _x2 = 8; _x2 < 81;_x2++){

            var inst = instance_position(_x2,_y,solid_o)



            instance_destroy(inst);

            show_debug_message("COMPLETO");

    }

      

}

}
any ideas will be accepted
 

Nidoking

Member
You're not moving the blocks down after clearing the line. You might want to fix that.

Reasonably, you'd tell each block above the cleared line to move down one line's worth of pixels. More lines, increase the number of pixels.
 

Unpedro

Member
You're not moving the blocks down after clearing the line. You might want to fix that.

Reasonably, you'd tell each block above the cleared line to move down one line's worth of pixels. More lines, increase the number of pixels.
thank you but i alredy solve it !
 
Top