Code acting weird and I don't know why

Im making a driving game for an assignment in one of my classes and for some reason the code for transferring horizontal speed to vertical speed when you turn isn’t adding the full value of the horizontal speed to your vertical speed and it also isnt clearing your horizontal speed. It also recently stopped switching the sprite from the moving down sprite to the moving right sprite and vice versa when you turn to that direction from the other direction.

1 Like

Could you make a share link and post it here? The share button is in the top right of the editor. Paste the link here and I can look at it.

2 Likes

also please do not make any changes to the code as this is a school assignment and I would prefer if you could just tell me how to fix it if possible, however if the only way you can help me fix it is by changing the code I need you to tell me what you changed.

Also, I made a mistake in my first post, so when you turn it didn’t turn any of you horizontal momentum into vertical momentum, I was just accelerating after I turned and thought it was the code.

here you go https://arcade.makecode.com/S08264-47885-45762-46274

1 Like

I have fixed the issue. It turns out that I set the velocities to the wrong axis and the game wasn’t reading part of my code which i managed to figure out how to fix, sorry for wasting your time.

2 Likes

No worries bud :grin: That’s the reason I’m on this forum. Sharing and helping

1 Like

This looks so cool! Can you update the share link when you’re done so we can play? :star_struck:

Yo, welcome to the forum! I’m ShaneyBoi09!

Always good to have a new member on the forums : ) I fixed my own issue very quickly after joining too!