I've recently made a game in Scratch named Dino T-rex. However, I can't make the dinosaur jump when an obstacle comes. It doesn't jump when the up arrow is clicked. Rather, it just goes front. How do I fix it?
3 Answers
In the block you are showing for the UP arrow, you are moving the sprite to coordinates -147,26 and then, after 2 seconds you are moving it again to -147,26. So there is no movement there (other than the first glide which moves the dino to the right).
You have to move the dino up (by changing the glide's Y-coordinate final destination) to a higher point, but you have almost the same value (y: 26 units) that you have when the dino appears in the starting position (y: 27 units)
The dino is moving to the right because you are only changing the x coordinate (x is the horizontal coordinate)
I think that you simply mixed X's and Y's

- 808
- 10
- 21
When you use the glide command your dino is only moving to the right and then stopping because the second glide block is to the same coordinates. You only want to change the second coordinate because then, the Y coordinate, so that the dino doesn't move left nor right, just up then straight down.
Also, you should not make it wait for 2 seconds, it is far too long. It is better if you just have a blank wait block so it goes straight up then back down.

- 3,425
- 30
- 38
- 48

- 26
- 3
You are first starting the dino at x=-175 and y=26, then you are gliding to x=-147 and y=26, then you are gliding to x=-147 and y=26.
Your first mistake is that you are gliding along the x-axis instead of the y-axis because y-axis is going up and down.
Your second mistake is that you are making it glide back to the same spot.

- 47
- 11