• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Moving blocks after clearing line - Tetris

U

Unpedro

Guest
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.
 
U

Unpedro

Guest
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