Weird glitch

For some reason if you go onto the ladder (yes, the ladder is glitchy) and the enemy approaches you, you get deleted from existence. But you’re supposed to touch them first. And also when being defeated you can move around. I tried to make the player (mario) stop moving, but you can still move when defeated. It’s like the game ignores it. Finally, pressing “A” makes you glitch. Idk why. Anyways, here’s the link. https://arcade.makecode.com/S24605-15852-98096-20882
Thanks.

1 Like

Okay so number one (on my list) You set the controller to not go back to moving normal so you can’t get off the ladder.
You set it so after 2 seconds you destroy the sprite so you get deleted
And I believe setting the ay acceleration to zero prevents you from moving.

Also pressing a glitches out because you changed the height Mario so the camera has to adjust.
Would you like me to make a fixed version?

FOUND THE PROBLEM!


This is auto destroying the sprite once it overlaps with the ladder. This happens after 2 seconds. You would have to remove the “After 2000MS Destroy mySprite.” So thats what you need to remove to stop the sprite from dying.

Oh thanks. And I forgot to change it from a ladder to the enemy. My mistake. :grimacing:

1 Like

Idk why, but the code messed up when I made the link.

1 Like

Sure, thanks.

1 Like