Sprite Glitch in Monster Truck

After finishing the tutorial for the Monster Truck Game, students have tried to customize their Sprite to be any number of items from the library. But once they change the sprite from the monster truck to anything else, then if the sprite touches the ceiling or ground of the game, it ceases to move and is stuck.

Is there a way to ensure that the sprite maintains its forward movement even when it’s not specifically a monster truck?

4 Likes

Welcome to the community, @nicole! And yes, the truck should still move if it does these things:

  • If it has a constant vx (velocity x)
  • If the sprite in the set (sprite) vx to block is the same as the one that the car sprite’s name

Please tell me if i messed something up

1 Like

Welcome to the forum. Could you please share some code so that I can find the issue?

1 Like

can you send the project? (so I don’t have to make it)

Thank you all for the suggestions! I’ve checked all those things and I believe all the code should be correct, but it’s still stopping movement as soon as it touches the ground or ceiling. This is the code as it’s customized right now. The only thing that’s been manipulated (as far as I know) from the direct tutorial is the background image and the sprite and it’s animation. Though, we’ve made sure that the name of the sprite remains the same throughout the code.

You could try an on game update block that constantly checks wheter or not it is hitting the ground or ceiling and then set its velocity to a certain number

This worked! Thank you so much!

3 Likes