# Help with jumping code

**URL:** <https://forum.makecode.com/t/help-with-jumping-code/43803>\
**Category:** Help\
**Created:** [May 3, 2026, 12:41am UTC](https://forum.makecode.com/t/help-with-jumping-code/43803 "2026-05-03T00:41:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![top\_hat\_lord](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/top_hat_lord/32/33469_2.png) [@top\_hat\_lord](https://forum.makecode.com/u/top_hat_lord)\
**Post date:** [May 3, 2026, 12:41am UTC](https://forum.makecode.com/t/help-with-jumping-code/43803/1 "2026-05-03T00:41:32Z")

</div>

I am currently working on a leap/dive function and got it somewhat working, but after a go it doesn’t seem to work.

> **[jumping](https://arcade.makecode.com/S59562-30711-01967-68336)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)\
**Post date:** [May 3, 2026, 3:12am UTC](https://forum.makecode.com/t/help-with-jumping-code/43803/2 "2026-05-03T03:12:19Z")

</div>

a thing you could do is just set the y coordinate slightly higher, then wait a bit, then slightly higher, then wait a bit and so on to achieve the looks of a jump.

---

<div class="post-metadata">

**Author:** ![top\_hat\_lord](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/top_hat_lord/32/33469_2.png) [@top\_hat\_lord](https://forum.makecode.com/u/top_hat_lord)\
**Post date:** [May 3, 2026, 4:26pm UTC](https://forum.makecode.com/t/help-with-jumping-code/43803/3 "2026-05-03T16:26:54Z")

</div>

well that might work, but its more tedious work and doesn’t work to help solve the problem of the main function stopping after a second use. the function works for this; it just doesn’t work twice for some unknown reason.(edit while writing, it seems to be random when it stops)

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [May 3, 2026, 4:27pm UTC](https://forum.makecode.com/t/help-with-jumping-code/43803/4 "2026-05-03T16:27:02Z")

</div>

You’re overcomplicating it.

 ![Wow, how simple!](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/5/357925fa48c1fe054570db7ed674baaf4f87af13.png)  
This is all you need in your function.

---

<div class="post-metadata">

**Author:** ![AlexTheGoober63](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexthegoober63/32/35080_2.png) [@AlexTheGoober63](https://forum.makecode.com/u/AlexTheGoober63)\
**Post date:** [May 4, 2026, 6:16am UTC](https://forum.makecode.com/t/help-with-jumping-code/43803/5 "2026-05-04T06:16:14Z")

</div>

All I did is do Y acceleration for gravity lol, but maybe that won’t work so much if you dont have a floor for the sprite to land on
