Make stop block then appear new block

Hi all

I just new learned Phaser 3 and I’m making a stack tower game, and I’m having a hard time stopping the block and then bringing up a new block, can anyone help me, sorry for my bad english.

thanks for ur help

Could you describe in detail how your game is intended to work? It would be easier to tackle one problem at a time. So, for your first problem, you said you cannot make the block “stop”. What exactly do you mean by this? Stop falling? Stop moving horizontally? Etc.

sorry if i don’t detail, i mean make block stop moving horizontal using click mouse, can u help me?

Maybe have a look at this example.
If you put your code online somewhere (codepen, codesandbox, etc), it’s easier for us to help.

create :

cube = this.add.sprite(300,650, “cGame”);
cube.setScale(0.2);

speed = 4;

update :

cube.x = cube.x + speed;

if (cube.x > 520) {
    speed = -speed;
}
else if (cube.x < 80) {
    speed = -speed;
    }

that code for my moving block

In the example you see this:

this.input.on("pointerdown", this.dropCrate, this);

this.movingCrate.visible = false;
this.addFallingCrate();

So it just hides the horizontally moving block, then adds a falling block, and on collision shows the moving again.

okey i will try to use that method