# How do I make enemies jump?

**URL:** <https://forum.makecode.com/t/how-do-i-make-enemies-jump/37296>\
**Category:** Help\
**Tags:** game\
**Created:** [June 12, 2025, 9:54pm UTC](https://forum.makecode.com/t/how-do-i-make-enemies-jump/37296 "2025-06-12T21:54:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJM](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@CJM](https://forum.makecode.com/u/CJM)\
**Post date:** [June 12, 2025, 9:54pm UTC](https://forum.makecode.com/t/how-do-i-make-enemies-jump/37296/1 "2025-06-12T21:54:23Z")

</div>

Hello there, I am making a side scrolling game which gradually throughout the level I have made thus far, the terrain ascends. In the level I have enemies that follow you, the only problem being that I can’t make them jump. I’m sure that I’ve missed something, but I couldn’t find anything online. Sorry if this has been done before.

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [June 13, 2025, 12:20am UTC](https://forum.makecode.com/t/how-do-i-make-enemies-jump/37296/2 "2025-06-13T00:20:21Z")

</div>

Welcome to the forums! I bet you could use that “\<tile to [right] of (mySprite) is [tile]\>” block to do it. I would probably use it with a “not \< \>” block and check for empty tiles, so that you don’t have to do it for every block they could encounter. Then you could give them all gravity, and if the blocks to their right or left are ever not the empty tile, then you make them jump by setting their y velocity. Running that all in a “for (value) in (array of all sprites of kind [enemy])” so it loops through every enemy, and putting that into a forever block should work.

---

<div class="post-metadata">

**Author:** ![BlobDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobdev/32/25519_2.png) [@BlobDev](https://forum.makecode.com/u/BlobDev)\
**Post date:** [June 13, 2025, 12:20am UTC](https://forum.makecode.com/t/how-do-i-make-enemies-jump/37296/3 "2025-06-13T00:20:26Z")

</div>

> [@Cool enemy code](https://forum.makecode.com/t/cool-enemy-code/36880):
>
> My cool enemy code. The enemy will follow you around the tilemaps, jumping over gaps and moving towards you.
